aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2024-01-23 19:19:38 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2024-01-23 19:19:38 +0000
commitde5a8c5cb4000408522e80c9917b71ce3228b616 (patch)
tree5fd6b88279fe1350b877c107bb45939c0fe046d6 /modules/processing.py
parentbac30eb3e7f790f5514b14e5feec78f8bc9da518 (diff)
downloadstable-diffusion-webui-gfx803-de5a8c5cb4000408522e80c9917b71ce3228b616.tar.gz
stable-diffusion-webui-gfx803-de5a8c5cb4000408522e80c9917b71ce3228b616.tar.bz2
stable-diffusion-webui-gfx803-de5a8c5cb4000408522e80c9917b71ce3228b616.zip
add an option to not overlay original image for inpainting for #14727
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 72d8093b..52f00bfb 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -1005,7 +1005,13 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
image = pp.image
mask_for_overlay = getattr(p, "mask_for_overlay", None)
- overlay_image = p.overlay_images[i] if getattr(p, "overlay_images", None) is not None and i < len(p.overlay_images) else None
+
+ if not shared.opts.overlay_inpaint:
+ overlay_image = None
+ elif getattr(p, "overlay_images", None) is not None and i < len(p.overlay_images):
+ overlay_image = p.overlay_images[i]
+ else:
+ overlay_image = None
if p.scripts is not None:
ppmo = scripts.PostProcessMaskOverlayArgs(i, mask_for_overlay, overlay_image)