aboutsummaryrefslogtreecommitdiffstats
path: root/modules/upscaler.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-31 16:31:19 +0000
committerGitHub <noreply@github.com>2023-05-31 16:31:19 +0000
commit177d4b6828eee6a9aa1e9f2cf4877ad9ae8fcae4 (patch)
tree466c92812f7b978cf3a535187c18be78c4e26d37 /modules/upscaler.py
parentc1a5068ebea127412dfaaa6598795196a64200f1 (diff)
parent881de0df38c1fa6d0d61f7bc6fc93c100a9f35d0 (diff)
downloadstable-diffusion-webui-gfx803-177d4b6828eee6a9aa1e9f2cf4877ad9ae8fcae4.tar.gz
stable-diffusion-webui-gfx803-177d4b6828eee6a9aa1e9f2cf4877ad9ae8fcae4.tar.bz2
stable-diffusion-webui-gfx803-177d4b6828eee6a9aa1e9f2cf4877ad9ae8fcae4.zip
Merge branch 'dev' into sync-req
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)