diff --git a/modules/upscaler.py b/modules/upscaler.py index 3c82861d7..494609937 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -53,8 +53,8 @@ class Upscaler: def upscale(self, img: PIL.Image, scale, selected_model: str = None): self.scale = scale - dest_w = round((img.width * scale - 4) / 8) * 8 - dest_h = round((img.height * scale - 4) / 8) * 8 + dest_w = int((img.width * scale) // 8 * 8) + dest_h = int((img.height * scale) // 8 * 8) for _ in range(3): shape = (img.width, img.height)