Unverified Commit 233dffdc authored by Mehmet Yiğit Özgenç's avatar Mehmet Yiğit Özgenç Committed by GitHub
Browse files

flux controlnet inpaint config bug (#10291)



* flux controlnet inpaint config bug

* Update src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py

---------
Co-authored-by: default avataryigitozgenc <yigit@quantuslabs.ai>
Co-authored-by: default avatarhlky <hlky@hlky.ac>
parent be207099
...@@ -1095,7 +1095,11 @@ class FluxControlNetInpaintPipeline(DiffusionPipeline, FluxLoraLoaderMixin, From ...@@ -1095,7 +1095,11 @@ class FluxControlNetInpaintPipeline(DiffusionPipeline, FluxLoraLoaderMixin, From
timestep = t.expand(latents.shape[0]).to(latents.dtype) timestep = t.expand(latents.shape[0]).to(latents.dtype)
# predict the noise residual # predict the noise residual
if self.controlnet.config.guidance_embeds: if isinstance(self.controlnet, FluxMultiControlNetModel):
use_guidance = self.controlnet.nets[0].config.guidance_embeds
else:
use_guidance = self.controlnet.config.guidance_embeds
if use_guidance:
guidance = torch.full([1], guidance_scale, device=device, dtype=torch.float32) guidance = torch.full([1], guidance_scale, device=device, dtype=torch.float32)
guidance = guidance.expand(latents.shape[0]) guidance = guidance.expand(latents.shape[0])
else: else:
......
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