Commit 552f8bc8 authored by CodeHatchling's avatar CodeHatchling

"Uncrop" the original denoised image for the composite step, fixing a...

"Uncrop" the original denoised image for the composite step, fixing a "ValueError: Images do not match" *shudder*
parent 28a2b5b4
...@@ -994,6 +994,10 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: ...@@ -994,6 +994,10 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
# we need to keep the original image around # we need to keep the original image around
# and use it in the composite step. # and use it in the composite step.
original_denoised_image = image.copy() 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) image = apply_overlay(image, p.paste_to, i, p.overlay_images)
if save_samples: if save_samples:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment