From ffc4eb09f12f17aa9e9722229e41a06bf1ce5aa4 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 18 Feb 2023 11:14:34 -0600 Subject: [PATCH] update reported image size when correction is run twice --- api/onnx_web/params.py | 4 ++++ api/params.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/onnx_web/params.py b/api/onnx_web/params.py index 4e91708f..603cf537 100644 --- a/api/onnx_web/params.py +++ b/api/onnx_web/params.py @@ -210,6 +210,10 @@ class UpscaleParams: ) def resize(self, size: Size) -> Size: + face_outscale = self.face_outscale + if self.upscale_order == "correction-both": + face_outscale *= self.face_outscale + return Size( size.width * self.outscale * self.face_outscale, size.height * self.outscale * self.face_outscale, diff --git a/api/params.json b/api/params.json index a15164db..48b8bdf8 100644 --- a/api/params.json +++ b/api/params.json @@ -128,7 +128,7 @@ "step": 8 }, "upscaleOrder": { - "default": "correction-last", + "default": "correction-first", "keys": [ "correction-both", "correction-first",