Skip to content

Commit

Permalink
fix torch.compile for multi-controlnet of sdxl inpaint (huggingface#7476
Browse files Browse the repository at this point in the history
)

fix

Co-authored-by: Sayak Paul <[email protected]>
  • Loading branch information
yiyixuxu and sayakpaul authored Mar 27, 2024
1 parent 45b42d1 commit ead82fe
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1601,10 +1601,7 @@ def denoising_value_valid(dnv):
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:]
Expand Down

0 comments on commit ead82fe

Please sign in to comment.