Skip to content

Conversation

@Buumcode
Copy link

@Buumcode Buumcode commented Dec 25, 2025

After update to v0.6.0 got this error in Nunchaku LoRA Loader:

!!! Exception during processing !!! 'NoneType' object is not callable
Traceback (most recent call last):
  File "c:\ComfyUI\execution.py", line 516, 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, v3_data=v3_data)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ComfyUI\execution.py", line 330, 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, v3_data=v3_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\ComfyUI\execution.py", line 304, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "c:\ComfyUI\execution.py", line 292, in process_inputs
    result = f(**inputs)
             ^^^^^^^^^^^
  File "C:\ComfyUI\custom_nodes\ComfyUI-nunchaku\nodes\lora\flux.py", line 117, in load_lora
    ret_model = copy.deepcopy(model)  # copy everything except the model
                ^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 162, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 259, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 136, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 221, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 162, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 259, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 136, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 221, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 162, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\miniconda3\Lib\copy.py", line 261, in _reconstruct
    y.__setstate__(state)
TypeError: 'NoneType' object is not callable

Prompt executed in 48.54 seconds
Exception ignored in: <function ModelPatcher.__del__ at 0x000002386C4B67A0>
Traceback (most recent call last):
  File "c:\ComfyUI\comfy\model_patcher.py", line 1357, in __del__
    self.unpin_all_weights()
  File "c:\ComfyUI\comfy\model_patcher.py", line 654, in unpin_all_weights
    for key in list(self.pinned):
                    ^^^^^^^^^^^
AttributeError: 'ModelPatcher' object has no attribute 'pinned'

This fix AttributeError in ModelPatcher.del by adding safety check for 'pinned'.
***With pull request in ComfyUI-nunchaku - nunchaku-ai/ComfyUI-nunchaku#737

@rattus128
Copy link
Contributor

What happens with just your nunchaku change? It looks like the real fix.

@trollver9000
Copy link

everyone is using nunchaku with zimage and qwens , comfy devs should be more careful to not break nunchaku nodes by new fundamental changes , now we are stuck with 4.0

@comfy-pr-bot
Copy link
Member

Test Evidence Check

⚠️ Warning: Test Explanation Missing

If this PR modifies behavior that requires testing, a test explanation is required. PRs lacking applicable test explanations may not be reviewed until added. Please add test explanations to ensure code quality and prevent regressions.

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.

You can add it by:

  • GitHub: Drag & drop media directly into the PR description
  • YouTube: Include a link to a short demo

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

Successfully merging this pull request may close these issues.

4 participants