Skip to content

Commit

Permalink
flux controlnet inpaint config bug (huggingface#10291)
Browse files Browse the repository at this point in the history
* flux controlnet inpaint config bug

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

---------

Co-authored-by: yigitozgenc <[email protected]>
Co-authored-by: hlky <[email protected]>
  • Loading branch information
3 people authored Dec 21, 2024
1 parent be20709 commit 233dffd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,11 @@ def __call__(
timestep = t.expand(latents.shape[0]).to(latents.dtype)

# 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 = guidance.expand(latents.shape[0])
else:
Expand Down

0 comments on commit 233dffd

Please sign in to comment.