Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Stable Cascade) The controlnet is not working, an error occurred on the 【Apply Controlnet】node #2884

Open
daidongzhe opened this issue Feb 23, 2024 · 15 comments

Comments

@daidongzhe
Copy link

【Apply Controlnet】node & canny controlnet model

error info:

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "E:__ai_env\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:__ai_env\comfyui\ComfyUI_windows_portable\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 "E:__ai_env\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:__ai_env\comfyui\ComfyUI_windows_portable\ComfyUI\nodes.py", line 814, in apply_controlnet
c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent))
^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'

@brundlesprout
Copy link

check your unet loader, first should be stage_b, second should be stage_c

@MoonMoon82
Copy link

@brundlesprout The controlnet node should be placed into the positive conditioning of the stage_c sampler. But exactly this produces this error.
I already posted it in #2785 but nobody cared yet :(

@axel578
Copy link

axel578 commented Feb 28, 2024

It would increase stable cascade usage a lot if control net model was supported

@Matthaeus07
Copy link

This bugs me out too. If someone wants the (not working) workflow here.
However, this is how it should work according to the documentation.

@SSA4
Copy link

SSA4 commented Mar 3, 2024

Still waiting for a fix of this error

@MoonMoon82
Copy link

At least the canny controlnet works successfully!

@Matthaeus07
Copy link

At least the canny controlnet works successfully!

How did you get it to work? May you share your workflow?

@MoonMoon82
Copy link

@Matthaeus07 Using canny controlnet works just like any other model. Just make sure that it is only connected to stage_c sampler.

SuperResolution also works now!
But to use it, it's neccessary to use the new "StableCascade_SuperResolutionControlnet" node as kind of preprocessor and connect stage_c and stage_b latent outputs to each sampler.

@Tener
Copy link

Tener commented Mar 8, 2024

Would any of you mind sharing example workflow for controlnet + stable cascade?

@Matthaeus07
Copy link

Matthaeus07 commented Mar 10, 2024

Just got it working. Here is the sc-canny-workflow.json

@EtienneExalgo
Copy link

EtienneExalgo commented Mar 13, 2024

Just got it working. Here is the sc-canny-workflow.json

Hi Mattaeus07, thanks !

Can you explain a bit more ? Your workflow fires the same error for me : "Error occurred when executing ControlNetApplyAdvanced:

'NoneType' object has no attribute 'copy'"

@Matthaeus07
Copy link

Just got it working. Here is the sc-canny-workflow.json

Hi Mattaeus07, thanks !

Can you explain a bit more ? Your workflow fires the same error for me : "Error occurred when executing ControlNetApplyAdvanced:

'NoneType' object has no attribute 'copy'"

I am sorry that it does not work for you. Try updating ComfyUI. I hope that will fix the problem for you!

@defensezone
Copy link

Just got it working. Here is the sc-canny-workflow.json

Hi Mattaeus07, thanks !
Can you explain a bit more ? Your workflow fires the same error for me : "Error occurred when executing ControlNetApplyAdvanced:
'NoneType' object has no attribute 'copy'"

I am sorry that it does not work for you. Try updating ComfyUI. I hope that will fix the problem for you!

canny works, but super_resolution gives an error:
`Error occurred when executing ControlNetApply:

'NoneType' object has no attribute 'copy'

File "w:\GIT\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "w:\GIT\ComfyUI_windows_portable\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 "w:\GIT\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "w:\GIT\ComfyUI_windows_portable\ComfyUI\nodes.py", line 770, in apply_controlnet
c_net = control_net.copy().set_cond_hint(control_hint, strength)
^^^^^^^^^^^^^^^^`

@rivo
Copy link

rivo commented Mar 23, 2024

'NoneType' object has no attribute 'copy'

Try updating ComfyUI. I hope that will fix the problem for you!

@EtienneExalgo I had exactly the same problem and updating ComfyUI to the latest version fixed it for me.

@eray124
Copy link

eray124 commented Mar 25, 2024

error
how can i fix it? Its same on my macbook and pc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests