Unverified Commit fbab3fc6 authored by catboxanon's avatar catboxanon Committed by GitHub
Browse files

Only handle image mask if any option enabled

parent 3af152d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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')