mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
allow resizing into non-integer sizes
This commit is contained in:
parent
a1305060ce
commit
11e648f6c7
@ -65,7 +65,7 @@ def run_extras(image, gfpgan_visibility, codeformer_visibility, codeformer_weigh
|
|||||||
while len(cached_images) > 2:
|
while len(cached_images) > 2:
|
||||||
del cached_images[next(iter(cached_images.keys()))]
|
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), ''
|
return image, plaintext_to_html(info), ''
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ class Upscaler:
|
|||||||
img = self.do_upscale(img)
|
img = self.do_upscale(img)
|
||||||
|
|
||||||
if img.width != w or img.height != h:
|
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
|
return img
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user