InstantID / InstantID

InstantID : Zero-shot Identity-Preserving Generation in Seconds 🔥
https://instantid.github.io/
Apache License 2.0
10.39k stars 755 forks source link

raise TypeError("For single controlnet: `controlnet_conditioning_scale` must be type `float`.") #146

Open MNeMoNiCuZ opened 4 months ago

MNeMoNiCuZ commented 4 months ago

I'm trying to use the ComfyUI wrapper of InstantID, but I get stuck at this errer message.

Error occurred when executing Instant ID Sampler:

For single controlnet: `controlnet_conditioning_scale` must be type `float`.

File "C:\AI\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\ComfyUI\custom_nodes\ComfyUI-InstantID\nodes.py", line 112, in sample
result = self.pipe(
^^^^^^^^^^
File "C:\AI\ComfyUI\venv\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\ComfyUI\custom_nodes\ComfyUI-InstantID\pipeline_stable_diffusion_xl_instantid.py", line 439, in __call__
self.check_inputs(
File "C:\AI\ComfyUI\venv\src\diffusers\src\diffusers\pipelines\controlnet\pipeline_controlnet_sd_xl.py", line 699, in check_inputs
raise TypeError("For single controlnet: `controlnet_conditioning_scale` must be type `float`.")

I'm not sure if it's relevant for this repo, or just the ComfyUI version.

Any help is appreciated.

haofanwang commented 4 months ago

It should be related to ComfyUI.

BTW, could you try give a float value to controlnet_conditioning_scale as the error suggested?

DsnTgr commented 4 months ago

When I use 0.27 dev, this issue happens. So I downgraded diffusers pip install diffusers==0.26.3, and then it's gone.

MNeMoNiCuZ commented 3 months ago

It should be related to ComfyUI.

BTW, could you try give a float value to controlnet_conditioning_scale as the error suggested?

Sorry for the delay in reply.

I am not even using any ControlNets though. I'm just following the examples as shown on the ComfyUI page:

Where would I input the controlnet_conditioning_scale in this node? I don't see an input for that.

image

yangyang0507 commented 3 months ago

Maybe you can refer to this pr:https://github.com/ZHO-ZHO-ZHO/ComfyUI-InstantID/pull/124

turkyden commented 2 months ago

When I use 0.27 dev, this issue happens. So I downgraded diffusers pip install diffusers==0.26.3, and then it's gone.

Good Job !

zejacky commented 2 months ago

When I use 0.27 dev, this issue happens. So I downgraded diffusers pip install diffusers==0.26.3, and then it's gone.

Thank you, yes it is working also for me. I think another custom node broke it with diffusers-0.28.0.dev0. Is there a change to a permanent solution?

Edit: By downgrading to 0.26.3, I cannot use some other extensions like BrushNet.

Thanks.

sswink commented 2 months ago

if downgrading to 0.26.3, cannot use some other extensions

Fearganainim commented 1 month ago

Getting this issue with SD Next