diff options
author | CodeHatchling <steve@codehatch.com> | 2023-12-03 21:49:41 +0000 |
---|---|---|
committer | CodeHatchling <steve@codehatch.com> | 2023-12-03 21:49:41 +0000 |
commit | 552f8bc832cd21ee0338e08b6a701687d0d79fad (patch) | |
tree | e168d7fd56d064827de0c973093188dbc6176b88 | |
parent | 28a2b5b4aab43424733039c31d910e8b8dd507cd (diff) | |
download | stable-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*
-rw-r--r-- | modules/processing.py | 4 |
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:
|