Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAIN RuntimeError: Tensors must have same number of dimensions: got 4 and 3 #50

Open
AugmentedRealityCat opened this issue Feb 9, 2024 · 0 comments

Comments

@AugmentedRealityCat
Copy link

I have tried everything I could think of to make CAIN video frame interpolation work with the CAIN VFI node, but no matter what I do I get a Tensors must have same number of dimensions: got 4 and 3 error message.

The following log shows what happens when I try to pass a 23 frames long sequence to it.

It seems to be able to create the images, hence the Comfy-VFI done! 46 frames generated at resolution: torch.Size([1, 3, 512, 512]) message, but after that step the frames are not sent to the next node where they would get converted to video.

Comfy-VFI: Clearing cache... Done cache clearing
Comfy-VFI: Clearing cache... Done cache clearing
Comfy-VFI done! 46 frames generated at resolution: torch.Size([1, 3, 512, 512])
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\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 "D:\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 "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Frame-Interpolation\vfi_models\cain\__init__.py", line 62, in vfi
    generic_frame_loop(frames, clear_cache_after_n_frames, multiplier, return_middle_frame, *args,
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Frame-Interpolation\vfi_utils.py", line 194, in generic_frame_loop
    out = torch.cat(output_frames, dim=0)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Tensors must have same number of dimensions: got 4 and 3

Prompt executed in 4.23 seconds
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

No branches or pull requests

1 participant