aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCodeHatchling <steve@codehatch.com>2023-12-03 14:49:41 -0700
committerCodeHatchling <steve@codehatch.com>2023-12-03 14:49:41 -0700
commit552f8bc832cd21ee0338e08b6a701687d0d79fad (patch)
treee168d7fd56d064827de0c973093188dbc6176b88 /modules
parent28a2b5b4aab43424733039c31d910e8b8dd507cd (diff)
"Uncrop" the original denoised image for the composite step, fixing a "ValueError: Images do not match" *shudder*
Diffstat (limited to 'modules')
-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: