InstantID icon indicating copy to clipboard operation
InstantID copied to clipboard

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

Open MNeMoNiCuZ opened this issue 1 year ago • 8 comments

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.

MNeMoNiCuZ avatar Feb 17 '24 20:02 MNeMoNiCuZ

It should be related to ComfyUI.

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

haofanwang avatar Feb 18 '24 17:02 haofanwang

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

DsnTgr avatar Feb 27 '24 09:02 DsnTgr

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

MNeMoNiCuZ avatar Mar 04 '24 23:03 MNeMoNiCuZ

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

yangyang0507 avatar Mar 29 '24 13:03 yangyang0507

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 !

turkyden avatar Apr 08 '24 12:04 turkyden

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.

zejacky avatar Apr 15 '24 21:04 zejacky

if downgrading to 0.26.3, cannot use some other extensions

sswink avatar Apr 21 '24 11:04 sswink

Getting this issue with SD Next

Fearganainim avatar May 13 '24 18:05 Fearganainim