ControlNetApplyAdvanced 'NoneType' object has no attribute 'copy'

#32
by izobelvice - opened

Hi, I'm using the latest version of Flex.1-dev-Controlnet-Union with Comfyui and seem to get the following issue when I try to run a workflow using ControlNet with Flux.1-dev. Can anyone help please?

ComfyUI Error Report

Error Details

  • Node Type: ControlNetApplyAdvanced
  • Exception Type: AttributeError
  • Exception Message: 'NoneType' object has no attribute 'copy'

Stack Trace

  File "FILEPATH", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "FILEPATH", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "FILEPATH", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "FILEPATH", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "FILEPATHComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^

System Information

  • ComfyUI Version: v0.2.3
  • Arguments: ComfyUI\main.py --windows-standalone-build
  • OS: nt
  • Python Version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
  • Embedded Python: true
  • PyTorch Version: 2.4.1+cu124

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync
    • Type: cuda
    • VRAM Total: 12884246528
    • VRAM Free: 1962692088
    • Torch VRAM Total: 9865003008
    • Torch VRAM Free: 59526648

Logs

2024-10-16 19:46:02,324 - root - INFO - Total VRAM 12287 MB, total RAM 32745 MB
2024-10-16 19:46:02,324 - root - INFO - pytorch version: 2.4.1+cu124
2024-10-16 19:46:02,325 - root - INFO - Set vram state to: NORMAL_VRAM
2024-10-16 19:46:02,325 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync
2024-10-16 19:46:08,288 - root - INFO - Using pytorch cross attention
2024-10-16 19:46:24,887 - root - INFO - [Prompt Server] web root: FILEPATHComfyUI_windows_portable\ComfyUI\web
2024-10-16 19:46:37,231 - root - INFO - 
Import times for custom nodes:
2024-10-16 19:46:37,232 - root - INFO -    0.0 seconds: FILEPATHComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
2024-10-16 19:46:37,232 - root - INFO -    0.1 seconds: FILEPATHComfyUI_windows_portable\ComfyUI\custom_nodes\cg-use-everywhere
2024-10-16 19:46:37,232 - root - INFO -    0.1 seconds: FILEPATHComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale
2024-10-16 19:46:37,233 - root - INFO -    0.5 seconds: FILEPATHComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
2024-10-16 19:46:37,233 - root - INFO -    0.7 seconds: FILEPATHComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
2024-10-16 19:46:37,233 - root - INFO -    1.8 seconds: FILEPATHComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
2024-10-16 19:46:37,234 - root - INFO -    5.1 seconds: FILEPATHComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AdvancedLivePortrait
2024-10-16 19:46:37,234 - root - INFO - 
2024-10-16 19:46:37,274 - root - INFO - Starting server

2024-10-16 19:46:37,275 - root - INFO - To see the GUI go to: http://127.0.0.1:8188
2024-10-16 19:46:55,376 - root - INFO - got prompt
2024-10-16 19:46:56,927 - root - INFO - Using pytorch attention in VAE
2024-10-16 19:46:56,932 - root - INFO - Using pytorch attention in VAE
2024-10-16 19:47:10,940 - root - WARNING - Warning torch.load doesn't support weights_only on this pytorch version, loading unsafely.
2024-10-16 19:47:15,125 - root - ERROR - error could not detect control model type.
2024-10-16 19:47:15,126 - root - ERROR - error checkpoint does not contain controlnet or t2i adapter data FILEPATHComfyUI_windows_portable\ComfyUI\models\controlnet\diffusion_pytorch_model.safetensors
2024-10-16 19:53:27,652 - root - WARNING - clip missing: ['text_projection.weight']
2024-10-16 19:53:28,150 - root - INFO - Requested to load FluxClipModel_
2024-10-16 19:53:28,151 - root - INFO - Loading 1 new model
2024-10-16 19:53:32,047 - root - INFO - loaded completely 0.0 9319.23095703125 True
2024-10-16 19:53:38,695 - root - ERROR - !!! Exception during processing !!! 'NoneType' object has no attribute 'copy'
2024-10-16 19:53:38,746 - root - ERROR - Traceback (most recent call last):
  File "FILEPATH", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "FILEPATH", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATHComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'

2024-10-16 19:53:38,748 - root - INFO - Prompt executed in 403.36 seconds
2024-10-16 19:57:14,936 - root - INFO - got prompt
2024-10-16 19:57:15,067 - root - ERROR - !!! Exception during processing !!! 'NoneType' object has no attribute 'copy'
2024-10-16 19:57:15,069 - root - ERROR - Traceback (most recent call last):
  File "FILEPATH", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "FILEPATH", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATHComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'

2024-10-16 19:57:15,072 - root - INFO - Prompt executed in 0.12 seconds
2024-10-16 19:57:33,641 - root - INFO - got prompt
2024-10-16 19:57:33,766 - root - ERROR - !!! Exception during processing !!! 'NoneType' object has no attribute 'copy'
2024-10-16 19:57:33,767 - root - ERROR - Traceback (most recent call last):
  File "FILEPATH", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "FILEPATH", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATHComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'

2024-10-16 19:57:33,770 - root - INFO - Prompt executed in 0.11 seconds
2024-10-16 20:02:30,020 - root - INFO - got prompt
2024-10-16 20:02:30,145 - root - ERROR - !!! Exception during processing !!! 'NoneType' object has no attribute 'copy'
2024-10-16 20:02:30,146 - root - ERROR - Traceback (most recent call last):
  File "FILEPATH", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATH", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "FILEPATH", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "FILEPATHComfyUI_windows_portable\ComfyUI\nodes.py", line 848, in apply_controlnet
    c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae=vae, extra_concat=extra_concat)
            ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'copy'

2024-10-16 20:02:30,148 - root - INFO - Prompt executed in 0.11 seconds

Attached Workflow

Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

Workflow too large. Please manually upload the workflow from local file system.

Additional Context

(Please add any additional context or steps to reproduce the error here)

Same problem here... :(

Same! can we get the previous versions to try???

Has anyone solved this problem?

Sign up or log in to comment