aboutsummaryrefslogtreecommitdiffstats
path: root/modules/upscaler.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-06-01 05:42:50 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-06-01 05:42:50 +0000
commitb3390a984081950c626070889580e01727689921 (patch)
treef1fb3352f91d70034d54a99c220f1ca594d8b3dc /modules/upscaler.py
parent0cc05fc492a9360d3b2f1b3f64c7d74f9041f74e (diff)
parent36888092afa82ee248bc947229f813b453629317 (diff)
downloadstable-diffusion-webui-gfx803-b3390a984081950c626070889580e01727689921.tar.gz
stable-diffusion-webui-gfx803-b3390a984081950c626070889580e01727689921.tar.bz2
stable-diffusion-webui-gfx803-b3390a984081950c626070889580e01727689921.zip
Merge branch 'dev' into startup-profile
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)