Skip to content

Commit 233dffd

Browse files
yigitozgencyigitquantushlky
authored
flux controlnet inpaint config bug (#10291)
* 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]>
1 parent be20709 commit 233dffd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,11 @@ def __call__(
10951095
timestep = t.expand(latents.shape[0]).to(latents.dtype)
10961096

10971097
# predict the noise residual
1098-
if self.controlnet.config.guidance_embeds:
1098+
if isinstance(self.controlnet, FluxMultiControlNetModel):
1099+
use_guidance = self.controlnet.nets[0].config.guidance_embeds
1100+
else:
1101+
use_guidance = self.controlnet.config.guidance_embeds
1102+
if use_guidance:
10991103
guidance = torch.full([1], guidance_scale, device=device, dtype=torch.float32)
11001104
guidance = guidance.expand(latents.shape[0])
11011105
else:

0 commit comments

Comments
 (0)