Skip to content

Commit 30a5acc

Browse files
yiyixuxuyiyixuxu
andauthored
fix a bug in sdxl-controlnet-img2img when using MultiControlNetModel (huggingface#4862)
fix Co-authored-by: yiyixuxu <yixu310@gmail,com>
1 parent 0c77554 commit 30a5acc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,7 @@ def __call__(
11771177
do_classifier_free_guidance=do_classifier_free_guidance,
11781178
guess_mode=guess_mode,
11791179
)
1180+
height, width = control_image.shape[-2:]
11801181
elif isinstance(controlnet, MultiControlNetModel):
11811182
control_images = []
11821183

@@ -1196,9 +1197,9 @@ def __call__(
11961197
control_images.append(control_image_)
11971198

11981199
control_image = control_images
1200+
height, width = control_image[0].shape[-2:]
11991201
else:
12001202
assert False
1201-
height, width = control_image.shape[-2:]
12021203

12031204
# 5. Prepare timesteps
12041205
self.scheduler.set_timesteps(num_inference_steps, device=device)

0 commit comments

Comments
 (0)