aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorCodeHatchling <steve@codehatch.com>2023-12-03 21:49:41 +0000
committerCodeHatchling <steve@codehatch.com>2023-12-03 21:49:41 +0000
commit552f8bc832cd21ee0338e08b6a701687d0d79fad (patch)
treee168d7fd56d064827de0c973093188dbc6176b88 /modules/processing.py
parent28a2b5b4aab43424733039c31d910e8b8dd507cd (diff)
downloadstable-diffusion-webui-gfx803-552f8bc832cd21ee0338e08b6a701687d0d79fad.tar.gz
stable-diffusion-webui-gfx803-552f8bc832cd21ee0338e08b6a701687d0d79fad.tar.bz2
stable-diffusion-webui-gfx803-552f8bc832cd21ee0338e08b6a701687d0d79fad.zip
"Uncrop" the original denoised image for the composite step, fixing a "ValueError: Images do not match" *shudder*
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 66aaab83..cd7216f8 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -994,6 +994,10 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
# we need to keep the original image around
# and use it in the composite step.
original_denoised_image = image.copy()
+
+ if p.paste_to is not None:
+ original_denoised_image = uncrop(original_denoised_image, (p.overlay_images[i].width, p.overlay_images[i].height), p.paste_to)
+
image = apply_overlay(image, p.paste_to, i, p.overlay_images)
if save_samples: