"vscode:/vscode.git/clone" did not exist on "b21e0bfb102e0854fbb114d0e06fa31a1fe8d03e"
Unverified Commit 30a5acc3 authored by YiYi Xu's avatar YiYi Xu Committed by GitHub
Browse files

fix a bug in sdxl-controlnet-img2img when using MultiControlNetModel (#4862)



fix
Co-authored-by: default avataryiyixuxu <yixu310@gmail,com>
parent 0c775544
......@@ -1177,6 +1177,7 @@ class StableDiffusionXLControlNetImg2ImgPipeline(DiffusionPipeline, TextualInver
do_classifier_free_guidance=do_classifier_free_guidance,
guess_mode=guess_mode,
)
height, width = control_image.shape[-2:]
elif isinstance(controlnet, MultiControlNetModel):
control_images = []
......@@ -1196,9 +1197,9 @@ class StableDiffusionXLControlNetImg2ImgPipeline(DiffusionPipeline, TextualInver
control_images.append(control_image_)
control_image = control_images
height, width = control_image[0].shape[-2:]
else:
assert False
height, width = control_image.shape[-2:]
# 5. Prepare timesteps
self.scheduler.set_timesteps(num_inference_steps, device=device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment