Kosinkadink / ComfyUI-Advanced-ControlNet

ControlNet scheduling and masking nodes with sliding context support
GNU General Public License v3.0
619 stars 61 forks source link

'ControlNet' object has no attribute 'load_device' #41

Closed kalijason closed 11 months ago

kalijason commented 11 months ago

Hi @Kosinkadink, I appreciate your contributions for animations, all of your ComfyUI plugging is very helpful.

I met some errors while loading controlnet advaned and had no clue, could you please help on this?

error log

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "/home/kalijason/git/ComfyUI/execution.py", line 153, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalijason/git/ComfyUI/execution.py", line 83, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalijason/git/ComfyUI/execution.py", line 76, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalijason/git/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/control/nodes.py", line 87, in load_controlnet
    controlnet = load_controlnet(controlnet_path, timestep_keyframe)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalijason/git/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/control/control.py", line 728, in load_controlnet
    return convert_to_advanced(control, timestep_keyframe=timestep_keyframe)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalijason/git/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/control/control.py", line 737, in convert_to_advanced
    return ControlNetAdvanced.from_vanilla(v=control, timestep_keyframe=timestep_keyframe)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kalijason/git/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/control/control.py", line 630, in from_vanilla
    global_average_pooling=v.global_average_pooling, device=v.device, load_device=v.load_device, manual_cast_dtype=v.manual_cast_dtype)
                                                                                  ^^^^^^^^^^^^^
AttributeError: 'ControlNet' object has no attribute 'load_device'
Kosinkadink commented 11 months ago

Your ComfyUI must not be up to date. The reason load_device is even mentioned in my code is to match the code changes that happened in ComfyUI several days ago. Make sure you are in master branch of ComfyUI and you do a git pull. Confirm that the git pull is actually going through - if there are some changes on your end that git does not like, you'll see a message about merge failing or something of that sort.

kalijason commented 11 months ago

oh, I thought it was updated... because I already pushed the upate button on ComfyUI Manager

image

but it turns out my git followed my origin repo.. after git pull upstream master, it fixed Thanks for the help..