1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

fix torch.compile for multi-controlnet of sdxl inpaint (#7476)

fix

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
YiYi Xu
2024-03-26 16:38:32 -10:00
committed by GitHub
parent 45b42d1203
commit ead82fedea

View File

@@ -1601,10 +1601,7 @@ class StableDiffusionXLControlNetInpaintPipeline(
1.0 - float(i / len(timesteps) < s or (i + 1) / len(timesteps) > e)
for s, e in zip(control_guidance_start, control_guidance_end)
]
if isinstance(self.controlnet, MultiControlNetModel):
controlnet_keep.append(keeps)
else:
controlnet_keep.append(keeps[0])
controlnet_keep.append(keeps if isinstance(controlnet, MultiControlNetModel) else keeps[0])
# 9. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline
height, width = latents.shape[-2:]