You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError("MultiControlNet is not yet supported.")
160
+
controlnet=MultiControlNetModel(controlnet)
161
161
162
162
self.register_modules(
163
163
vae=vae,
@@ -530,6 +530,15 @@ def check_inputs(
530
530
"If `negative_prompt_embeds` are provided, `negative_pooled_prompt_embeds` also have to be passed. Make sure to generate `negative_pooled_prompt_embeds` from the same text encoder that was used to generate `negative_prompt_embeds`."
531
531
)
532
532
533
+
# `prompt` needs more sophisticated handling when there are multiple
raiseValueError("A single batch of multiple conditionings are supported at the moment.")
564
+
eliflen(image) !=len(self.controlnet.nets):
565
+
raiseValueError(
566
+
f"For multiple controlnets: `image` must have the same length as the number of controlnets, but got {len(image)} images and {len(self.controlnet.nets)} ControlNets."
f"`control_guidance_start` has {len(control_guidance_start)} elements, but `control_guidance_end` has {len(control_guidance_end)} elements. Make sure to provide the same number of elements to each list."
f"`control_guidance_start`: {control_guidance_start} has {len(control_guidance_start)} elements but there are {len(self.controlnet.nets)} controlnets available. Make sure to provide {len(self.controlnet.nets)}."
f"If image batch size is not 1, image batch size must be same as prompt batch size. image batch size: {image_batch_size}, prompt batch size: {prompt_batch_size}"
607
663
)
608
664
665
+
# Copied from diffusers.pipelines.controlnet.pipeline_controlnet.StableDiffusionControlNetPipeline.prepare_image
609
666
defprepare_image(
610
667
self,
611
668
image,
@@ -888,6 +945,9 @@ def __call__(
888
945
# corresponds to doing no classifier free guidance.
0 commit comments