Kosinkadink / ComfyUI-AnimateDiff-Evolved

Improved AnimateDiff for ComfyUI and Advanced Sampling Support
Apache License 2.0
2.66k stars 199 forks source link

Error occurred when executing Int: object of type 'int' has no len() #149

Closed Mackay031 closed 2 months ago

Mackay031 commented 11 months ago

Hi. I have been getting this error in a few of my workflows.

Error occurred when executing Int:

object of type 'int' has no len()

File "/Users/———/———/———/———/ComfyUI/execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/———/———/———/———/ComfyU/ComfyUI/execution.py", line 97, in get_output_data
output_is_list = [False] * len(results[0])
^^^^^^^^^^^^^^^

Any ideas what may be causing it. I have had a look at execution.py but to be honest, I have no idea what I am looking for...

Thanks :)

Kosinkadink commented 11 months ago

Can you post the whole error from the console?

Mackay031 commented 11 months ago

Hey, sure, here it is:

got prompt
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "/Users/———/———/———/———/ComfyUI/ComfyUI/execution.py", line 153, in ```
recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/———/———/———/———/ComfyUI/ComfyUI/execution.py", line 97, in get_output_data
    output_is_list = [False] * len(results[0])
                               ^^^^^^^^^^^^^^^
TypeError: object of type 'int' has no len()

Prompt executed in 0.02 seconds

Also, interestingly. when I I tried to 'Update All' in Manager, I noticed this error in console:

Updating failed: /Users/———/———/———/———/ComfyUI/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved
Cmd('git') failed due to: exit code(128)
  cmdline: git pull -v --rebase -- origin
  stderr: 'error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.' 

I then tried Updating directly in the list and that seemed to go through. Not sure if its related. After the update, I ran the prompt again on that workflow and still received the original error at the top.

Thanks, Andy

Kosinkadink commented 10 months ago

I don't know if you've already resolved your issue, but if you still need assistance, post your workflow or at least a screenshot of it. Something is likely up with it

Mackay031 commented 10 months ago

Hey, no it appears it is still an issue. I get this error, or at least the first part in most of my animation workflows:

ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "/Users/———/———/———/———/ComfyUI/execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I can't seem to figure out any other custom node that is causing this. It appears a few people have posted this issue on the ComfyUI Github. Some say updating to latest versions of Nodes (including AnimateDiff Evolved) has helped them, but it hasn't worked for me.

Here is an example workflow I have just run to illustrate the issues:

Example_workflow.json

And this is the error message (I included everything after the progress bar):

[AnimateDiffEvo] - INFO - Ejecting motion module temporaldiff-v1-animatediff.safetensors version v1.
[AnimateDiffEvo] - INFO - Cleaning motion module from unet.
[AnimateDiffEvo] - INFO - Removing motion module temporaldiff-v1-animatediff.safetensors from cache
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "/Users/andrew_mackay_1/Documents/—— Resources/—— ComfyUI/ComfyUI/execution.py", line 153, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/———/———/———/———/ComfyU/execution.py", line 83, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/———/———/———/———/ComfyU/ComfyUI/execution.py", line 76, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/———/———/———/———/ComfyU/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 7108, in was_save_images
    tokens = TextTokens()
             ^^^^^^^^^^^^
  File "/Users/———/———/———/———/ComfyU/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 835, in __init__
    '[cuda_name]': comfy.model_management.get_torch_device_name(),
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: get_torch_device_name() missing 1 required positional argument: 'device'

In the above example, the error appears at the 'Image Save' node. However, as mentioned, errors have been appearing at other nodes in different workflows. Some examples:

Screenshot 2023-11-13 at 15 41 15 Screenshot 2023-11-13 at 18 18 59

Thanks for your time!!

Mackay031 commented 10 months ago

Ps. I believe I am running the latest version of all custom nodes (including. AnimateDiff Evolved) and ComfyUI

zhutou748 commented 8 months ago

Error occurred when executing ADE_AnimateDiffLoRALoader:

expected str, bytes or os.PathLike object, not NoneType

File "G:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\nodes_lora.py", line 36, in load_motion_lora if not Path(lora_path).is_file(): ^^^^^^^^^^^^^^^ File "pathlib.py", line 871, in new File "pathlib.py", line 509, in _from_parts File "pathlib.py", line 493, in _parse_args

Kosinkadink commented 2 months ago

Gonna assume this is long solved, closing.