Unverified Commit 0c71189a authored by Philip Brown's avatar Philip Brown Committed by GitHub
Browse files

Allow SD pipeline to use newer schedulers, eg: FlowMatch (#12015)

Allow SD pipeline to use newer schedulers, eg: FlowMatch,
by skipping attribute that doesnt exist there
(scale_model_input)
 Lines starting
parent 58d2b10a
......@@ -1034,7 +1034,8 @@ class StableDiffusionPipeline(
# expand the latents if we are doing classifier free guidance
latent_model_input = torch.cat([latents] * 2) if self.do_classifier_free_guidance else latents
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
if hasattr(self.scheduler, "scale_model_input"):
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
# predict the noise residual
noise_pred = self.unet(
......
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