aboutsummaryrefslogtreecommitdiff
path: root/modules/upscaler.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-31 19:15:21 +0300
committerGitHub <noreply@github.com>2023-05-31 19:15:21 +0300
commit52b8752e6201e24c783f674f8dc0681027e10ea9 (patch)
tree30470f64d84cadc4140023c0bf34c35bb68f79b0 /modules/upscaler.py
parent00dfe27f59727407c5b408a80ff2a262934df495 (diff)
parent78a602ae8c006077ca93913576335a3a33dba7cb (diff)
Merge branch 'dev' into report-error
Diffstat (limited to 'modules/upscaler.py')
-rw-r--r--modules/upscaler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/upscaler.py b/modules/upscaler.py
index 7b1046d6..3c82861d 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 = int(img.width * scale)
- dest_h = int(img.height * scale)
+ dest_w = round((img.width * scale - 4) / 8) * 8
+ dest_h = round((img.height * scale - 4) / 8) * 8
for _ in range(3):
shape = (img.width, img.height)