ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

ControlNet' object has no attribute 'device

Open guoqianghao9 opened this issue 1 year ago • 3 comments

Expected Behavior

OS win11 Python Version 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)] Embedded Python true Pytorch Version 2.5.0+cu124 Arguments ComfyUI\main.py --cpu --windows-standalone-build

run run_cpu.bat

ComfyUI Error Report

Error Details

  • Node Type: ACN_AdvancedControlNetApply
  • Exception Type: AttributeError
  • Exception Message: 'ControlNet' object has no attribute 'device'

Stack Trace

  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", 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 "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", 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 "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\nodes.py", line 144, in apply_controlnet
    c_net = convert_to_advanced(control_net.copy()).set_cond_hint(control_hint, strength, (start_percent, end_percent), vae_optional)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control.py", line 515, in convert_to_advanced
    control = ControlNetAdvanced.from_vanilla(v=control, timestep_keyframe=timestep_keyframe)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control.py", line 129, in from_vanilla
    global_average_pooling=v.global_average_pooling, compression_ratio=v.compression_ratio, latent_format=v.latent_format, device=v.device, load_device=v.load_device,
                                                                                                                                  ^^^^^^^^

System Information

  • ComfyUI Version: v0.2.4-4-g66b0961
  • Arguments: ComfyUI\main.py --cpu --windows-standalone-build
  • OS: nt
  • Python Version: 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
  • Embedded Python: true
  • PyTorch Version: 2.5.0+cu124

Devices

  • Name: cpu
    • Type: cpu
    • VRAM Total: 68393086976
    • VRAM Free: 21967478784
    • Torch VRAM Total: 68393086976
    • Torch VRAM Free: 21967478784

Logs

2024-10-24 14:43:04,333 - root - INFO - Total VRAM 65225 MB, total RAM 65225 MB
2024-10-24 14:43:04,333 - root - INFO - pytorch version: 2.5.0+cu124
2024-10-24 14:43:04,333 - root - INFO - Set vram state to: DISABLED
2024-10-24 14:43:04,333 - root - INFO - Device: cpu
2024-10-24 14:43:05,295 - root - INFO - Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
2024-10-24 14:43:06,624 - root - INFO - [Prompt Server] web root: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\web
2024-10-24 14:43:07,273 - root - WARNING - Traceback (most recent call last):
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\nodes.py", line 2001, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 991, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1128, in get_code
  File "<frozen importlib._bootstrap_external>", line 1186, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\ChromeDownload\\ComfyUI_windows_portable_nvidia\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\ComfyUI-ToonCrafter\\__init__.py'

2024-10-24 14:43:07,273 - root - WARNING - Cannot import D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ToonCrafter module for custom nodes: [Errno 2] No such file or directory: 'D:\\ChromeDownload\\ComfyUI_windows_portable_nvidia\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\ComfyUI-ToonCrafter\\__init__.py'
2024-10-24 14:43:08,694 - root - INFO - 
Import times for custom nodes:
2024-10-24 14:43:08,694 - root - INFO -    0.0 seconds: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
2024-10-24 14:43:08,694 - root - INFO -    0.0 seconds (IMPORT FAILED): D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ToonCrafter
2024-10-24 14:43:08,694 - root - INFO -    0.0 seconds: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet
2024-10-24 14:43:08,694 - root - INFO -    0.0 seconds: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved
2024-10-24 14:43:08,694 - root - INFO -    0.1 seconds: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite
2024-10-24 14:43:08,694 - root - INFO -    0.2 seconds: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
2024-10-24 14:43:08,694 - root - INFO -    0.3 seconds: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux
2024-10-24 14:43:08,695 - root - INFO -    1.1 seconds: D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui
2024-10-24 14:43:08,695 - root - INFO - 
2024-10-24 14:43:08,700 - root - INFO - Starting server

2024-10-24 14:43:08,700 - root - INFO - To see the GUI go to: http://127.0.0.1:8188
2024-10-24 14:43:11,242 - root - INFO - got prompt
2024-10-24 14:43:58,485 - root - INFO - model weight dtype torch.float32, manual cast: None
2024-10-24 14:43:58,487 - root - INFO - model_type EPS
2024-10-24 14:44:00,078 - root - INFO - Using split attention in VAE
2024-10-24 14:44:00,079 - root - INFO - Using split attention in VAE
2024-10-24 14:44:00,429 - root - INFO - Requested to load SD1ClipModel
2024-10-24 14:44:00,429 - root - INFO - Loading 1 new model
2024-10-24 14:44:00,431 - root - INFO - loaded completely 0.0 235.84423828125 True
2024-10-24 14:44:03,053 - root - ERROR - !!! Exception during processing !!! 'ControlNet' object has no attribute 'device'
2024-10-24 14:44:03,055 - root - ERROR - Traceback (most recent call last):
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", 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 "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", 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 "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\nodes.py", line 144, in apply_controlnet
    c_net = convert_to_advanced(control_net.copy()).set_cond_hint(control_hint, strength, (start_percent, end_percent), vae_optional)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control.py", line 515, in convert_to_advanced
    control = ControlNetAdvanced.from_vanilla(v=control, timestep_keyframe=timestep_keyframe)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control.py", line 129, in from_vanilla
    global_average_pooling=v.global_average_pooling, compression_ratio=v.compression_ratio, latent_format=v.latent_format, device=v.device, load_device=v.load_device,
                                                                                                                                  ^^^^^^^^
AttributeError: 'ControlNet' object has no attribute 'device'

2024-10-24 14:44:03,056 - root - INFO - Prompt executed in 51.78 seconds
2024-10-24 14:44:41,377 - root - INFO - got prompt
2024-10-24 14:44:42,147 - root - ERROR - !!! Exception during processing !!! 'ControlNet' object has no attribute 'device'
2024-10-24 14:44:42,148 - root - ERROR - Traceback (most recent call last):
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", 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 "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", 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 "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\nodes.py", line 144, in apply_controlnet
    c_net = convert_to_advanced(control_net.copy()).set_cond_hint(control_hint, strength, (start_percent, end_percent), vae_optional)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control.py", line 515, in convert_to_advanced
    control = ControlNetAdvanced.from_vanilla(v=control, timestep_keyframe=timestep_keyframe)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ChromeDownload\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control.py", line 129, in from_vanilla
    global_average_pooling=v.global_average_pooling, compression_ratio=v.compression_ratio, latent_format=v.latent_format, device=v.device, load_device=v.load_device,
                                                                                                                                  ^^^^^^^^
AttributeError: 'ControlNet' object has no attribute 'device'



### Actual Behavior

![image](https://github.com/user-attachments/assets/2847a8ac-b408-4558-9664-4e7ab3d7c251)


### Steps to Reproduce

ByteDance/AnimateDiff-Lightning

### Debug Logs

```powershell
2024-10-24 14:44:42,149 - root - INFO - Prompt executed in 0.73 seconds

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

{"last_node_id":39,"last_link_id":64,"nodes":[{"id":18,"type":"CheckpointLoaderSimple","pos":{"0":120,"1":190},"size":{"0":315,"1":98},"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[35],"slot_index":0,"shape":3},{"name":"CLIP","type":"CLIP","links":[26,27],"slot_index":1,"shape":3},{"name":"VAE","type":"VAE","links":[45],"slot_index":2,"shape":3}],"properties":{"Node name for S&R":"CheckpointLoaderSimple"},"widgets_values":["toonyou_beta6.safetensors"]},{"id":21,"type":"CLIPTextEncode","pos":{"0":460,"1":360},"size":{"0":250,"1":120},"flags":{},"order":7,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":27}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[31],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":[""]},{"id":23,"type":"ACN_AdvancedControlNetApply","pos":{"0":730,"1":200},"size":{"0":285.6000061035156,"1":286},"flags":{},"order":13,"mode":0,"inputs":[{"name":"positive","type":"CONDITIONING","link":30},{"name":"negative","type":"CONDITIONING","link":31},{"name":"control_net","type":"CONTROL_NET","link":32},{"name":"image","type":"IMAGE","link":33},{"name":"mask_optional","type":"MASK","link":null,"shape":7},{"name":"timestep_kf","type":"TIMESTEP_KEYFRAME","link":null,"shape":7},{"name":"latent_kf_override","type":"LATENT_KEYFRAME","link":null,"shape":7},{"name":"weights_override","type":"CONTROL_NET_WEIGHTS","link":null,"shape":7},{"name":"model_optional","type":"MODEL","link":36,"shape":7},{"name":"vae_optional","type":"VAE","link":null,"shape":7}],"outputs":[{"name":"positive","type":"CONDITIONING","links":[38],"slot_index":0,"shape":3},{"name":"negative","type":"CONDITIONING","links":[39],"slot_index":1,"shape":3},{"name":"model_opt","type":"MODEL","links":[37],"slot_index":2,"shape":3}],"properties":{"Node name for S&R":"ACN_AdvancedControlNetApply"},"widgets_values":[1,0,1,""]},{"id":25,"type":"KSampler","pos":{"0":1040,"1":200},"size":{"0":315,"1":262},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":37},{"name":"positive","type":"CONDITIONING","link":38},{"name":"negative","type":"CONDITIONING","link":39},{"name":"latent_image","type":"LATENT","link":56}],"outputs":[{"name":"LATENT","type":"LATENT","links":[44],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"KSampler"},"widgets_values":[978124275291170,"randomize",4,1,"euler","sgm_uniform",1]},{"id":33,"type":"ADE_EmptyLatentImageLarge","pos":{"0":1040,"1":80},"size":{"0":310.79998779296875,"1":74},"flags":{},"order":11,"mode":0,"inputs":[{"name":"width","type":"INT","link":53,"widget":{"name":"width"}},{"name":"height","type":"INT","link":54,"widget":{"name":"height"}},{"name":"batch_size","type":"INT","link":55,"widget":{"name":"batch_size"}}],"outputs":[{"name":"LATENT","type":"LATENT","links":[56],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"ADE_EmptyLatentImageLarge"},"widgets_values":[512,512,1]},{"id":31,"type":"ADE_StandardStaticContextOptions","pos":{"0":120,"1":720},"size":{"0":319.20001220703125,"1":198},"flags":{},"order":1,"mode":0,"inputs":[{"name":"prev_context","type":"CONTEXT_OPTIONS","link":null,"slot_index":0,"shape":7},{"name":"view_opts","type":"VIEW_OPTS","link":null,"shape":7}],"outputs":[{"name":"CONTEXT_OPTS","type":"CONTEXT_OPTIONS","links":[51],"shape":3}],"properties":{"Node name for S&R":"ADE_StandardStaticContextOptions"},"widgets_values":[16,4,"pyramid",false,0,1]},{"id":20,"type":"CLIPTextEncode","pos":{"0":460,"1":190},"size":{"0":250,"1":120},"flags":{},"order":6,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":26}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[30],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["A beautiful girl dancing, pink long hair, city street, tall buildings."]},{"id":24,"type":"ADE_AnimateDiffLoaderGen1","pos":{"0":120,"1":450},"size":{"0":315,"1":242},"flags":{},"order":8,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":35},{"name":"context_options","type":"CONTEXT_OPTIONS","link":51,"slot_index":1,"shape":7},{"name":"motion_lora","type":"MOTION_LORA","link":null,"shape":7},{"name":"ad_settings","type":"AD_SETTINGS","link":null,"shape":7},{"name":"ad_keyframes","type":"AD_KEYFRAMES","link":null,"shape":7},{"name":"sample_settings","type":"SAMPLE_SETTINGS","link":58,"slot_index":5,"shape":7},{"name":"scale_multival","type":"MULTIVAL","link":null,"shape":7},{"name":"effect_multival","type":"MULTIVAL","link":null,"shape":7},{"name":"per_block","type":"PER_BLOCK","link":null,"shape":7}],"outputs":[{"name":"MODEL","type":"MODEL","links":[36],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"ADE_AnimateDiffLoaderGen1"},"widgets_values":["animatediff_lightning_4step_comfyui.safetensors","sqrt_linear (AnimateDiff)"]},{"id":35,"type":"ADE_AnimateDiffSamplingSettings","pos":{"0":120,"1":970},"size":{"0":315,"1":234},"flags":{},"order":2,"mode":0,"inputs":[{"name":"noise_layers","type":"NOISE_LAYERS","link":null,"shape":7},{"name":"iteration_opts","type":"ITERATION_OPTS","link":null,"shape":7},{"name":"custom_cfg","type":"CUSTOM_CFG","link":null,"widget":{"name":"seed_override"},"shape":7},{"name":"sigma_schedule","type":"SIGMA_SCHEDULE","link":null,"shape":7},{"name":"image_inject","type":"IMAGE_INJECT","link":null,"shape":7}],"outputs":[{"name":"settings","type":"SAMPLE_SETTINGS","links":[58],"shape":3}],"properties":{"Node name for S&R":"ADE_AnimateDiffSamplingSettings"},"widgets_values":[0,"FreeNoise","comfy",0,0,false,""]},{"id":14,"type":"ImageGenResolutionFromImage","pos":{"0":-810,"1":90},"size":{"0":268.79998779296875,"1":46},"flags":{},"order":9,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":12}],"outputs":[{"name":"IMAGE_GEN_WIDTH (INT)","type":"INT","links":[13,53],"slot_index":0,"shape":3},{"name":"IMAGE_GEN_HEIGHT (INT)","type":"INT","links":[14,54],"slot_index":1,"shape":3}],"properties":{"Node name for S&R":"ImageGenResolutionFromImage"},"widgets_values":[]},{"id":17,"type":"DWPreprocessor","pos":{"0":-405,"1":328},"size":{"0":315,"1":222},"flags":{},"order":10,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":21}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[23],"slot_index":0,"shape":3},{"name":"POSE_KEYPOINT","type":"POSE_KEYPOINT","links":null,"shape":3}],"properties":{"Node name for S&R":"DWPreprocessor"},"widgets_values":["enable","enable","enable",256,"yolox_l.onnx","dw-ll_ucoco.onnx","disable"]},{"id":38,"type":"VHS_VideoCombine","pos":{"0":-130,"1":911},"size":[214.7587890625,666.2378472222222],"flags":{},"order":14,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":62},{"name":"audio","type":"AUDIO","link":60,"shape":7},{"name":"meta_batch","type":"VHS_BatchManager","link":null,"shape":7},{"name":"vae","type":"VAE","link":null,"shape":7},{"name":"frame_rate","type":"","link":61,"widget":{"name":"frame_rate"}}],"outputs":[{"name":"Filenames","type":"VHS_FILENAMES","links":null}],"properties":{"Node name for S&R":"VHS_VideoCombine"},"widgets_values":{"frame_rate":16,"loop_count":0,"filename_prefix":"AnimateDiff","format":"video/h264-mp4","pix_fmt":"yuv420p","crf":19,"save_metadata":true,"pingpong":false,"save_output":true,"videopreview":{"hidden":false,"paused":false,"params":{"filename":"AnimateDiff_00003-audio.mp4","subfolder":"","type":"output","format":"video/h264-mp4","frame_rate":16},"muted":false}}},{"id":39,"type":"VHS_VideoCombine","pos":{"0":742,"1":758},"size":{"0":214.7587890625,"1":330},"flags":{},"order":17,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":63},{"name":"audio","type":"AUDIO","link":null,"shape":7},{"name":"meta_batch","type":"VHS_BatchManager","link":null,"shape":7},{"name":"vae","type":"VAE","link":null,"shape":7},{"name":"frame_rate","type":"","link":64,"widget":{"name":"frame_rate"}}],"outputs":[{"name":"Filenames","type":"VHS_FILENAMES","links":null}],"properties":{"Node name for S&R":"VHS_VideoCombine"},"widgets_values":{"frame_rate":16,"loop_count":0,"filename_prefix":"AnimateDiff","format":"video/h264-mp4","pix_fmt":"yuv420p","crf":19,"save_metadata":false,"pingpong":false,"save_output":true,"videopreview":{"hidden":false,"paused":false,"params":{},"muted":false}}},{"id":28,"type":"VHS_VAEDecodeBatched","pos":{"0":1040,"1":510},"size":{"0":315,"1":78},"flags":{},"order":16,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":44},{"name":"vae","type":"VAE","link":45}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[63],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"VHS_VAEDecodeBatched"},"widgets_values":{"per_batch":4}},{"id":30,"type":"PrimitiveNode","pos":{"0":-810,"1":899},"size":{"0":210,"1":82},"flags":{},"order":3,"mode":0,"inputs":[],"outputs":[{"name":"FLOAT","type":"FLOAT","links":[61,64],"slot_index":0,"widget":{"name":"frame_rate"}}],"title":"Frame rate","properties":{"Run widget replace on values":false},"widgets_values":[16,"fixed"]},{"id":10,"type":"VHS_LoadVideo","pos":{"0":-810,"1":190},"size":[247.455078125,703.732763671875],"flags":{},"order":4,"mode":0,"inputs":[{"name":"meta_batch","type":"VHS_BatchManager","link":null,"shape":7},{"name":"vae","type":"VAE","link":null,"shape":7}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[12,21],"slot_index":0,"shape":3},{"name":"frame_count","type":"INT","links":[55],"slot_index":1,"shape":3},{"name":"audio","type":"AUDIO","links":[60],"slot_index":2,"shape":3},{"name":"video_info","type":"VHS_VIDEOINFO","links":null}],"properties":{"Node name for S&R":"VHS_LoadVideo"},"widgets_values":{"video":"ca27a8accc73c2d363e260a9a0f43e59.mp4","force_rate":0,"force_size":"Custom Height","custom_width":512,"custom_height":1024,"frame_load_cap":0,"skip_first_frames":0,"select_every_nth":1,"choose video to upload":"image","videopreview":{"hidden":false,"paused":false,"params":{"frame_load_cap":0,"skip_first_frames":0,"force_rate":0,"filename":"ca27a8accc73c2d363e260a9a0f43e59.mp4","type":"input","format":"video/mp4","select_every_nth":1,"force_size":"?x1024"}}}},{"id":15,"type":"Image Resize","pos":{"0":-503,"1":1033},"size":{"0":315,"1":178},"flags":{},"order":12,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":23},{"name":"resize_width","type":"INT","link":13,"widget":{"name":"resize_width"}},{"name":"resize_height","type":"INT","link":14,"widget":{"name":"resize_height"}}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[33,62],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"Image Resize"},"widgets_values":["resize","false","bilinear",1,1024,1536]},{"id":19,"type":"ControlNetLoader","pos":{"0":120,"1":340},"size":{"0":315,"1":58},"flags":{},"order":5,"mode":0,"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[32],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"ControlNetLoader"},"widgets_values":["SD3\InstantX-Controlnet-Pose\diffusion_pytorch_model.safetensors"]}],"links":[[12,10,0,14,0,"IMAGE"],[13,14,0,15,1,"INT"],[14,14,1,15,2,"INT"],[21,10,0,17,0,"IMAGE"],[23,17,0,15,0,"IMAGE"],[26,18,1,20,0,"CLIP"],[27,18,1,21,0,"CLIP"],[30,20,0,23,0,"CONDITIONING"],[31,21,0,23,1,"CONDITIONING"],[32,19,0,23,2,"CONTROL_NET"],[33,15,0,23,3,"IMAGE"],[35,18,0,24,0,"MODEL"],[36,24,0,23,8,"MODEL"],[37,23,2,25,0,"MODEL"],[38,23,0,25,1,"CONDITIONING"],[39,23,1,25,2,"CONDITIONING"],[44,25,0,28,0,"LATENT"],[45,18,2,28,1,"VAE"],[51,31,0,24,1,"CONTEXT_OPTIONS"],[53,14,0,33,0,"INT"],[54,14,1,33,1,"INT"],[55,10,1,33,2,"INT"],[56,33,0,25,3,"LATENT"],[58,35,0,24,5,"SAMPLE_SETTINGS"],[60,10,2,38,1,"AUDIO"],[61,30,0,38,4,"FLOAT"],[62,15,0,38,0,"IMAGE"],[63,28,0,39,0,"IMAGE"],[64,30,0,39,4,"FLOAT"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.8264462809917354,"offset":[501.22314311495774,-80.79363533158654]}},"version":0.4}


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

Other

No response

guoqianghao9 avatar Oct 24 '24 06:10 guoqianghao9

If you agree, report an error. I'll wait and let you know if it's solved.

janeleviv avatar Oct 24 '24 08:10 janeleviv

i agree , is already a Potential Bug

guoqianghao9 avatar Oct 24 '24 08:10 guoqianghao9

x2 add the same issue Changes that provoke the Issue are on this commit: https://github.com/comfyanonymous/ComfyUI/commit/754597c8a92f0d074dea8a0a74b2d34c3aae29b9

darkflare avatar Oct 24 '24 09:10 darkflare

X3 Same issue,

DavidSnow1 avatar Oct 24 '24 20:10 DavidSnow1

It was good the day before yesterday, but not today, reporting the same error

oktetopython avatar Oct 24 '24 23:10 oktetopython

Are any of you using Tiled Diffusion? I got the same error, I was using the Tiled Diffusion node, I turned it off, and the error went away.

bombadooski avatar Oct 25 '24 02:10 bombadooski

Are any of you using Tiled Diffusion? I got the same error, I was using the Tiled Diffusion node, I turned it off, and the error went away.

Yes, but turning it off isn't a viable solution.

DavidSnow1 avatar Oct 25 '24 06:10 DavidSnow1

Happened to me as well. Hope it gets fix soon.

925-Studio avatar Oct 25 '24 08:10 925-Studio

Happened to me as well. Hope it gets fix soon.

gvhn11111 avatar Oct 25 '24 08:10 gvhn11111

X4 Same issue

JimmyGenuine avatar Oct 25 '24 11:10 JimmyGenuine

X5 me2

offmybach avatar Oct 25 '24 19:10 offmybach

x6 me!

ZehCoque avatar Oct 25 '24 19:10 ZehCoque

After updating all I also saw an update to advanced controlnet and this fixed the issue for me.

novice-101 avatar Oct 25 '24 21:10 novice-101

Can confirm that. Kosinkadink updated https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet/commit/95e26b9b7906415a3a51e10ded09d6b17f908f8d Now it works just fine 👌

darkflare avatar Oct 26 '24 07:10 darkflare

PixelTiledKSampleUpscalerProviderPipe throws this error.

Traceback (most recent call last):
  File "E:\diffusion\ComfyUI\execution.py", 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 "E:\diffusion\ComfyUI\execution.py", 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 "E:\diffusion\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "E:\diffusion\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_pack.py", line 1315, in doit
    refined_latent = IterativeLatentUpscale().doit(latent, upscale_factor, steps, temp_prefix, upscaler, step_mode, unique_id)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_pack.py", line 1267, in doit
    current_latent = upscaler.upscale_shape(step_info, current_latent, new_w, new_h, temp_prefix)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 2007, in upscale_shape
    refined_latent = self.tiled_ksample(upscaled_latent, upscaled_images)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 1962, in tiled_ksample
    return TiledKSampler().sample(model, seed, tile_width, tile_height, tiling_strategy, steps, cfg, sampler_name,
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 326, in sample
    return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 261, in sample_common
    slice_cnet(tile_h, tile_h_len, tile_w, tile_w_len, m, img)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 91, in slice_cnet
    model.cond_hint = hint.to(model.control_model.dtype).to(model.device)
AttributeError: 'ControlNet' object has no attribute 'device'

SuperMasterBlasterLaser avatar Oct 26 '24 11:10 SuperMasterBlasterLaser

Same issue for me with Tiled Diffusion (workflow runs without issue when Tiled is bypassed) enabled (worked before a certain update from ComfyUI but can't pinpoint a specific one). Tried ControlNet from up-to-date EasyUse / Controlnet_Aux / Advanced-ControlNet and always has the error.

Error message: !!! Exception during processing !!! 'ControlNetAdvanced' object has no attribute 'device' image (Tried with other KSampler too and the problem persists).

Don't know if I should open an issue on Tiled Diffusion's Github too or is it just ComfyUI related?

Nem-z avatar Oct 26 '24 20:10 Nem-z

This issue occurs in custom nodes that haven't properly adapted to the 754597c patch. Please contact the maintainers of the custom node in question.

PixelTiledKSampleUpscalerProviderPipe throws this error.

Traceback (most recent call last):
  File "E:\diffusion\ComfyUI\execution.py", 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 "E:\diffusion\ComfyUI\execution.py", 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 "E:\diffusion\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "E:\diffusion\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_pack.py", line 1315, in doit
    refined_latent = IterativeLatentUpscale().doit(latent, upscale_factor, steps, temp_prefix, upscaler, step_mode, unique_id)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_pack.py", line 1267, in doit
    current_latent = upscaler.upscale_shape(step_info, current_latent, new_w, new_h, temp_prefix)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 2007, in upscale_shape
    refined_latent = self.tiled_ksample(upscaled_latent, upscaled_images)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 1962, in tiled_ksample
    return TiledKSampler().sample(model, seed, tile_width, tile_height, tiling_strategy, steps, cfg, sampler_name,
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 326, in sample
    return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 261, in sample_common
    slice_cnet(tile_h, tile_h_len, tile_w, tile_w_len, m, img)
  File "E:\diffusion\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 91, in slice_cnet
    model.cond_hint = hint.to(model.control_model.dtype).to(model.device)
AttributeError: 'ControlNet' object has no attribute 'device'

This issue occurs with ComfyUI_TiledKSampler. https://github.com/BlenderNeko/ComfyUI_TiledKSampler

ltdrdata avatar Oct 27 '24 09:10 ltdrdata

@SuperMasterBlasterLaser Until https://github.com/BlenderNeko/ComfyUI_TiledKSampler/pull/59 is merged, you can use this forked repo.

https://github.com/ltdrdata/ComfyUI_TiledKSampler

ltdrdata avatar Oct 27 '24 14:10 ltdrdata

@SuperMasterBlasterLaser Until BlenderNeko/ComfyUI_TiledKSampler#59 is merged, you can use this forked repo.

https://github.com/ltdrdata/ComfyUI_TiledKSampler

clone and overwrite done the trick, thanks

kusacubari avatar Oct 28 '24 21:10 kusacubari

Same problem!

laobenmao avatar Nov 03 '24 15:11 laobenmao

There have been many magical definitive fixes posted here that do not do anything so I am NOT saying this is a solution for everyone. Just one person's experience. I implemented every fix throughout this thread with zero effect, but today, 11/5/24, I updated the titled diffusion node through the comfy manager and it seemed to do something. I had previously uninstalled and reinstalled that node, maybe more than once, but this vanilla update attempt today was the first to have an effect. Good luck.

kornbluth1900 avatar Nov 05 '24 17:11 kornbluth1900

@kornbluth1900 Yeah, the issue is related to custom nodes' compatibility with the latest version of ComfyUI, instead of the other way around. It's up to custom nodes to update to regain compatibility, and the tiled diffusion node just updated a little while ago.

bombadooski avatar Nov 05 '24 19:11 bombadooski

Después de actualizar todo, también vi una actualización de controlnet avanzado y esto solucionó el problema.

can you share the solution ^?

danielcarrill avatar Nov 12 '24 08:11 danielcarrill

可以证实这一点。 Kosinkadink 更新了Kosinkadink/ComfyUI-Advanced-ControlNet@ 95e26b9 现在它工作得很好👌

It hasn't been resolved yet

janeleviv avatar Nov 15 '24 07:11 janeleviv

remove “custom_nodes/ComfyUI-Advanced-ControlNet” folder,restart and reinstall, will fixed it

可以证实这一点。 Kosinkadink 更新了Kosinkadink/ComfyUI-Advanced-ControlNet@ 95e26b9 现在它工作得很好👌

It hasn't been resolved yet

zzw5516 avatar Dec 22 '24 13:12 zzw5516