ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Z-image controlnet not working

Open Fqlox opened this issue 3 weeks ago • 6 comments

Custom Node Testing

Expected Behavior

I used the base workflow avalaible here for Image controlnet workflow. I did put the controlnet safetensor in the correct path. and I got the error :

Actual Behavior

Error at the loading of the controlnet node.

Steps to Reproduce

I'm using comfyui v0.3.77 Python 3.13 Pytorch2.8+cu129, portable version on windows 11.

Debug Logs

!!! Exception during processing !!! cannot access local variable 'model' where it is not associated with a value
Traceback (most recent call last):
  File "0:\\Documents\ComfyUI_windows_portable\ComfyUI\execution.py", line 510, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "0:\\Documents\ComfyUI_windows_portable\ComfyUI\execution.py", line 324, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "0:\\Documents\ComfyUI_windows_portable\ComfyUI\execution.py", line 298, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "0:\\Documents\ComfyUI_windows_portable\ComfyUI\execution.py", line 286, in process_inputs
    result = f(**inputs)
  File "0:\\Documents\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_model_patch.py", line 215, in load_model_patch
    model.load_state_dict(sd)
    ^^^^^
UnboundLocalError: cannot access local variable 'model' where it is not associated with a value

Other

No response

Fqlox avatar Dec 04 '25 13:12 Fqlox

You can follow my tutorial. I tried and succeeded after updating comfyUI and switching to Nightly Version but no result. Then I did as the video and succeeded: https://youtu.be/_9Nuo8imBTc

aixqueen avatar Dec 04 '25 14:12 aixqueen

You can follow my tutorial. I tried and succeeded after updating comfyUI and switching to Nightly Version but no result. Then I did as the video and succeeded: https://youtu.be/_9Nuo8imBTc

no youtube link sir. It went to github again

clemarjonlaguardia avatar Dec 05 '25 11:12 clemarjonlaguardia

no youtube link sir. It went to github again

Just copy the link to your browser instead of clicking on it. It's still the correct link.

dareima avatar Dec 05 '25 15:12 dareima

For Mac users or anyone who follows the above video but fails to load the nodes: This PR actually works https://github.com/comfyanonymous/ComfyUI/pull/11062/files

Copying and pasting these 3 files could fix the bug in v0.3.76

AoiYamada avatar Dec 06 '25 12:12 AoiYamada

对于 Mac 用户或任何按照上述视频操作但节点加载失败的用户: 这个 PR 实际上有效 https://github.com/comfyanonymous/ComfyUI/pull/11062/files

复制粘贴这 3 个文件可以修复 v0.3.76 版本中的错误。

Thank you, that solved my problem.

Laimaxleaf avatar Dec 07 '25 08:12 Laimaxleaf

For Mac users or anyone who follows the above video but fails to load the nodes: This PR actually works https://github.com/comfyanonymous/ComfyUI/pull/11062/files

Copying and pasting these 3 files could fix the bug in v0.3.76

This worked for me, thank you!

alexisrolland avatar Dec 07 '25 10:12 alexisrolland

For Mac users or anyone who follows the above video but fails to load the nodes: This PR actually works https://github.com/comfyanonymous/ComfyUI/pull/11062/files

Copying and pasting these 3 files could fix the bug in v0.3.76

You're a fuking life-saver.

FANdoraxxx avatar Dec 09 '25 08:12 FANdoraxxx

对于 Mac 用户或任何按照上述视频操作但节点加载失败的用户: 这个 PR 实际上有效 https://github.com/comfyanonymous/ComfyUI/pull/11062/files 复制粘贴这 3 个文件可以修复 v0.3.76 版本中的错误。

Thank you, that solved my problem.

Where should I put these files? I'm using Comfy Desktop

kukalikuk avatar Dec 09 '25 08:12 kukalikuk

对于 Mac 用户或任何按照上述视频操作但节点加载失败的用户: 这个 PR 实际上有效 https://github.com/comfyanonymous/ComfyUI/pull/11062/files 复制粘贴这 3 个文件可以修复 v0.3.76 版本中的错误。

Thank you, that solved my problem.

Where should I put these files? I'm using Comfy Desktop

Image paths here

FANdoraxxx avatar Dec 09 '25 08:12 FANdoraxxx

对于 Mac 用户或任何按照上述视频操作但节点加载失败的用户: 这个 PR 实际上有效 https://github.com/comfyanonymous/ComfyUI/pull/11062/files 复制粘贴这 3 个文件可以修复 v0.3.76 版本中的错误。

Thank you, that solved my problem.

Where should I put these files? I'm using Comfy Desktop

The two folders mentioned above can be found here:/Applications/ComfyUI.app/Contents/Resources/ComfyUI

tangchang0117 avatar Dec 09 '25 11:12 tangchang0117

Simply, updating the ComfyUi fixed the problem for me.

sumitillusionsAI avatar Dec 10 '25 06:12 sumitillusionsAI

For Mac users or anyone who follows the above video but fails to load the nodes: This PR actually works https://github.com/comfyanonymous/ComfyUI/pull/11062/files Copying and pasting these 3 files could fix the bug in v0.3.76

This worked for me, thank you!

This works for me! thank you !

on windows I put the files to this path C:\Users\myname\AppData\Local\Programs\ComfyUI\resources\ComfyUI\comfy\ldm\lumina

plseal avatar Dec 10 '25 12:12 plseal