Skip to content

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

Description

@BurguerJohn

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions