Skip to content

During inpainting, scaling latent before concat break some schedulers. #1276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BurguerJohn opened this issue Nov 14, 2022 · 1 comment · Fixed by #1331
Closed

During inpainting, scaling latent before concat break some schedulers. #1276

BurguerJohn opened this issue Nov 14, 2022 · 1 comment · Fixed by #1331
Labels
bug Something isn't working

Comments

@BurguerJohn
Copy link

Describe the bug

In pipeline_stable_diffusion_inpaint.py there is this two lines:

latent_model_input = torch.cat([latent_model_input, mask, masked_image_latents], dim=1)
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)

It seen to break some schedulers, setting scale first should fix it:

latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
latent_model_input = torch.cat([latent_model_input, mask, masked_image_latents], dim=1)

Reproduction

No response

Logs

No response

System Info

Windows

@BurguerJohn BurguerJohn added the bug Something isn't working label Nov 14, 2022
@patrickvonplaten
Copy link
Contributor

I think you're very right here! That's a great catch :-)
Thanks to you inpaint should now work for all schedulers ❤️

#1331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants