diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-02 17:01:16 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-02 17:01:16 +0000 |
commit | 4dbde228ff48dbb105241b1ed25c21ce3f87d182 (patch) | |
tree | 53387c37fbe048a66ce900cd9e1a7ff3dd3b0288 /modules | |
parent | ef27a18b6b7cb1a8eebdc9b2e88d25baf2c2414d (diff) | |
download | stable-diffusion-webui-gfx803-4dbde228ff48dbb105241b1ed25c21ce3f87d182.tar.gz stable-diffusion-webui-gfx803-4dbde228ff48dbb105241b1ed25c21ce3f87d182.tar.bz2 stable-diffusion-webui-gfx803-4dbde228ff48dbb105241b1ed25c21ce3f87d182.zip |
make it possible to use fractional values for SD upscale.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/upscaler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/upscaler.py b/modules/upscaler.py index c4e6e6bd..231680cb 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -53,10 +53,10 @@ class Upscaler: def do_upscale(self, img: PIL.Image, selected_model: str): return img - def upscale(self, img: PIL.Image, scale: int, selected_model: str = None): + def upscale(self, img: PIL.Image, scale, selected_model: str = None): self.scale = scale - dest_w = img.width * scale - dest_h = img.height * scale + dest_w = int(img.width * scale) + dest_h = int(img.height * scale) for i in range(3): shape = (img.width, img.height) |