Skip to content

Commit ead82fe

Browse files
yiyixuxusayakpaul
andauthored
fix torch.compile for multi-controlnet of sdxl inpaint (huggingface#7476)
fix Co-authored-by: Sayak Paul <[email protected]>
1 parent 45b42d1 commit ead82fe

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,10 +1601,7 @@ def denoising_value_valid(dnv):
16011601
1.0 - float(i / len(timesteps) < s or (i + 1) / len(timesteps) > e)
16021602
for s, e in zip(control_guidance_start, control_guidance_end)
16031603
]
1604-
if isinstance(self.controlnet, MultiControlNetModel):
1605-
controlnet_keep.append(keeps)
1606-
else:
1607-
controlnet_keep.append(keeps[0])
1604+
controlnet_keep.append(keeps if isinstance(controlnet, MultiControlNetModel) else keeps[0])
16081605

16091606
# 9. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline
16101607
height, width = latents.shape[-2:]

0 commit comments

Comments
 (0)