diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-04-14 21:24:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 21:24:55 +0000 |
commit | fbab3fc6d122fb4e6648dd82291a70fc348c0b4a (patch) | |
tree | 824fc17c69dee84c307f49fefc1d7f1ae1461eb5 /modules/processing.py | |
parent | 3af152d488db0c521f6058676e1a65c7157ccc14 (diff) | |
download | stable-diffusion-webui-gfx803-fbab3fc6d122fb4e6648dd82291a70fc348c0b4a.tar.gz stable-diffusion-webui-gfx803-fbab3fc6d122fb4e6648dd82291a70fc348c0b4a.tar.bz2 stable-diffusion-webui-gfx803-fbab3fc6d122fb4e6648dd82291a70fc348c0b4a.zip |
Only handle image mask if any option enabled
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py index f49992d9..5c6edc60 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -706,7 +706,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: image.info["parameters"] = text
output_images.append(image)
- if hasattr(p, 'mask_for_overlay') and p.mask_for_overlay:
+ if hasattr(p, 'mask_for_overlay') and p.mask_for_overlay and any([opts.save_mask, opts.save_mask_composite, opts.return_mask, opts.return_mask_composite]):
image_mask = p.mask_for_overlay.convert('RGB')
image_mask_composite = Image.composite(image.convert('RGBA').convert('RGBa'), Image.new('RGBa', image.size), images.resize_image(2, p.mask_for_overlay, image.width, image.height).convert('L')).convert('RGBA')
|