diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 13:17:32 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 13:17:32 +0000 |
commit | 11e648f6c75de2fb22460d34a618dbb3aa6df0bc (patch) | |
tree | cefc7b415da735fd60b1e11b062fadc7f6ff5e28 | |
parent | a1305060ce9a25ffb4752e2adc43c846a0f45bc5 (diff) | |
download | stable-diffusion-webui-gfx803-11e648f6c75de2fb22460d34a618dbb3aa6df0bc.tar.gz stable-diffusion-webui-gfx803-11e648f6c75de2fb22460d34a618dbb3aa6df0bc.tar.bz2 stable-diffusion-webui-gfx803-11e648f6c75de2fb22460d34a618dbb3aa6df0bc.zip |
allow resizing into non-integer sizes
-rw-r--r-- | modules/extras.py | 2 | ||||
-rw-r--r-- | modules/images.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/extras.py b/modules/extras.py index 9a8a0976..40935f98 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -65,7 +65,7 @@ def run_extras(image, gfpgan_visibility, codeformer_visibility, codeformer_weigh while len(cached_images) > 2:
del cached_images[next(iter(cached_images.keys()))]
- images.save_image(image, outpath, "", None, info=info, extension=opts.samples_format, short_filename=True, no_prompt=True, pnginfo_section_name="extras", p=p)
+ images.save_image(image, outpath, "", None, info=info, extension=opts.samples_format, short_filename=True, no_prompt=True, pnginfo_section_name="extras")
return image, plaintext_to_html(info), ''
diff --git a/modules/images.py b/modules/images.py index 4befddf0..334f8fec 100644 --- a/modules/images.py +++ b/modules/images.py @@ -332,7 +332,7 @@ class Upscaler: img = self.do_upscale(img)
if img.width != w or img.height != h:
- img = img.resize((w, h), resample=LANCZOS)
+ img = img.resize((int(w), int(h)), resample=LANCZOS)
return img
|