AnimatDiff error in Comfy

Viewing 7 reply threads
  • Author
    Posts
    • #17034
      David Rawlins
      Participant

        Hi Andrew,

        I’m using your workflow from the AnimateDiff Prompt Travel lesson and after installing the missing custom nodes to the colab UI I’m getting the following error:

        !!! Exception during processing !!! torch.cat(): expected a non-empty list of Tensors
        Traceback (most recent call last):
        File “/content/ComfyUI/execution.py”, line 327, 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 “/content/ComfyUI/execution.py”, line 202, 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 “/content/ComfyUI/execution.py”, line 174, in _map_node_over_list
        process_inputs(input_dict, i)
        File “/content/ComfyUI/execution.py”, line 163, in process_inputs
        results.append(getattr(obj, func)(**inputs))
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File “/content/ComfyUI/custom_nodes/comfyui_fizznodes/ScheduledNodes.py”, line 159, in animate
        return batch_prompt_schedule(settings, clip)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File “/content/ComfyUI/custom_nodes/comfyui_fizznodes/ScheduleTypes.py”, line 49, in batch_prompt_schedule
        p = BatchPoolAnimConditioning(pos_cur_prompt, pos_nxt_prompt, weight, clip, settings)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File “/content/ComfyUI/custom_nodes/comfyui_fizznodes/BatchFuncs.py”, line 345, in BatchPoolAnimConditioning
        final_pooled_output = torch.cat(pooled_out, dim=0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        RuntimeError: torch.cat(): expected a non-empty list of Tensors

        Prompt executed in 0.01 seconds

        This happens with different checkpoint models and also with different animate diff models

      • #17055
        AndrewAndrew
        Keymaster

          Hi David, I just tested the workflow on Colab, and it works correctly. I used the dreamshaper model and the motion model in the workflow. Did you change any settings?

        • #17056
          David Rawlins
          Participant

            Hi Andrew,

            Weird. I’ve just tried it again with the same error.  I dropped the workflow in, installed custom nodes, selected dreamshaper8 and ran it. I then tried it with a different SD1.5 model with the same result.

            I installed all the nodes at once without restarting in between each.

            I’ve copied a bit more of the log below – please let me know if I can provide more/different:

            got prompt
            model weight dtype torch.float16, manual cast: None
            model_type EPS
            Using pytorch attention in VAE
            Using pytorch attention in VAE
            VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
            CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
            warning, embedding:BadDream does not exist, ignoring
            Requested to load SD1ClipModel
            loaded completely 21284.175 235.84423828125 True
            !!! Exception during processing !!! torch.cat(): expected a non-empty list of Tensors
            Traceback (most recent call last):
            File “/content/ComfyUI/execution.py”, line 327, 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 “/content/ComfyUI/execution.py”, line 202, 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 “/content/ComfyUI/execution.py”, line 174, in _map_node_over_list
            process_inputs(input_dict, i)
            File “/content/ComfyUI/execution.py”, line 163, in process_inputs
            results.append(getattr(obj, func)(**inputs))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File “/content/ComfyUI/custom_nodes/comfyui_fizznodes/ScheduledNodes.py”, line 159, in animate
            return batch_prompt_schedule(settings, clip)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File “/content/ComfyUI/custom_nodes/comfyui_fizznodes/ScheduleTypes.py”, line 49, in batch_prompt_schedule
            p = BatchPoolAnimConditioning(pos_cur_prompt, pos_nxt_prompt, weight, clip, settings)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File “/content/ComfyUI/custom_nodes/comfyui_fizznodes/BatchFuncs.py”, line 345, in BatchPoolAnimConditioning
            final_pooled_output = torch.cat(pooled_out, dim=0)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            RuntimeError: torch.cat(): expected a non-empty list of Tensors

          • #17057
            AndrewAndrew
            Keymaster

              Mmm… The only things I can think of are:

              • Use a T4 instance (that’s what I used)
              • Remove or rename the custom_nodes folder in AI_PICS > ComfyUI
            • #17058
              David Rawlins
              Participant

                Thanks, Andrew

                I started from scratch with a new copy of the workflow and a new notebook, deleted the custom nodes folder and ran it on T4. This time it worked ok. The install custom nodes screen looked different and contained descriptions of each node which it hadn’t previously, though the nodes were the same. I’ve no idea how I messed things up.

                I must remember this – pull the plug out and start again! Thanks for your patience

              • #17059
                David Rawlins
                Participant

                  More on this.

                  I had the same problem when running the video to video ADiff workflow, having started from scratch as above. It seemed from the log that the problem was related to some of the custom nodes that I installed, possibly one of the Fizznode ones, and I wondered if I’d used versions that clashed or had bugs. So I started again and installed the nodes individually only installing the most recent numbered version and in the case of the Fizznodes BatchPromptSchedule, the original v1.0. The workflow then ran without problems though the log complained that:

                  /content/ComfyUI/custom_nodes/comfyui_fizznodes/BatchFuncs.py:169: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas.

                  No idea what pandas have to do with it! It worked with L4 and T4 runtypes.

                  I then reproduced the fault by reinstalling v1.2 of the node so it looks like it is buggy.

                • #17069
                  AndrewAndrew
                  Keymaster

                    It’s great to see you figured it out. It’s a warning, so nothing to worry about.

                  • #17090
                    David Rawlins
                    Participant

                      I thought I’d found the answer to the prompt travel issue: the BatchPromptSchedule node was sized so that the print_output box was hidden and it was set to false. I only realised when I compared this workflow with the one from the previous lesson. I set it to true. But it didn’t help.

                      I reproduced the previous findings: with v1.0.2, the node stops with Torch errors. With v1.0, it completes but there’s no prompt travel. I tried the slightly different version of the workflow on your separate post on all this but with the same results.

                      https://stable-diffusion-art.com/animatediff-prompt-travel-video2video/

                      I then ran the previous prompt travel workflow without video and the v1.0 node worked fine and she experienced all four seasons.

                      I think I’ve run out of patience!

                       

                       

                       

                       

                  Viewing 7 reply threads
                  • You must be logged in to reply to this topic.