Unverified Commit 4adad57e authored by Aryan V S's avatar Aryan V S Committed by GitHub
Browse files

UnboundLocalError in SDXLInpaint.prepare_latents() (#5648)



* fix: UnboundLocalError with image_latents

* chore: run make style, quality, fix-copies

* revert changes from make fix-copies

* revert changes from make fix-copies

---------
Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
parent 4e54dfe9
......@@ -741,6 +741,7 @@ class StableDiffusionXLInpaintPipeline(
if image.shape[1] == 4:
image_latents = image.to(device=device, dtype=dtype)
image_latents = image_latents.repeat(batch_size // image_latents.shape[0], 1, 1, 1)
elif return_image_latents or (latents is None and not is_strength_max):
image = image.to(device=device, dtype=dtype)
image_latents = self._encode_vae_image(image=image, generator=generator)
......
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