diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-23 20:29:53 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-23 20:29:53 +0000 |
commit | c8c662901b875c591cfec711a6d528ae38870e27 (patch) | |
tree | 87ca233a756504432623dc94203cc4b80f080eef | |
parent | 39ce23f42d9b63eff39c50a0d069a442e6416cf5 (diff) | |
download | stable-diffusion-webui-gfx803-c8c662901b875c591cfec711a6d528ae38870e27.tar.gz stable-diffusion-webui-gfx803-c8c662901b875c591cfec711a6d528ae38870e27.tar.bz2 stable-diffusion-webui-gfx803-c8c662901b875c591cfec711a6d528ae38870e27.zip |
fix for inpaint at full resolution breaking if you have an NN upscaler.
-rw-r--r-- | modules/images.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/images.py b/modules/images.py index c88ae475..40a64209 100644 --- a/modules/images.py +++ b/modules/images.py @@ -210,7 +210,7 @@ def draw_prompt_matrix(im, width, height, all_prompts): def resize_image(resize_mode, im, width, height):
def resize(im, w, h):
- if opts.upscaler_for_img2img is None or opts.upscaler_for_img2img == "None":
+ if opts.upscaler_for_img2img is None or opts.upscaler_for_img2img == "None" or im.mode == 'L':
return im.resize((w, h), resample=LANCZOS)
upscaler = [x for x in shared.sd_upscalers if x.name == opts.upscaler_for_img2img][0]
|