← See All Custom Node Packs

comfyui-animatediff

754

Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

LoadVideo

LoadVideo Node Documentation

Overview

The LoadVideo node is a component of the ComfyUI-animatediff integration that facilitates the loading of GIFs or video files as image sequences. This node is particularly useful for using animated content as input in workflows that support ControlNet or similar tools within ComfyUI. By converting GIFs or videos into an image sequence, it allows for frame-by-frame processing within your workflows.

Functionality

  1. Load Video Content: The node loads and processes a GIF or video file, extracting frames and presenting them as a series of images.
  2. Frame Selection: It provides options to start loading frames from a specific point and limit the number of frames extracted.
  3. Interactive Workflows: Ideal for applications requiring dynamic content inputs, like animation and video-to-video processing pipelines.

Inputs

The LoadVideo node requires the following inputs:

  • video: The video or GIF file to load. The node automatically lists available files within a specified directory for easy selection.
  • frame_start (Optional): This parameter allows you to specify the starting frame for the sequence. By default, it starts from the first frame.
  • frame_limit (Optional): This parameter limits the number of frames to load from the file. It helps in managing memory and processing time by controlling the amount of data processed.

Outputs

The node produces the following outputs:

  • frames: A sequence of images extracted from the video or GIF file. These frames are available for further processing within your workflow.
  • frame_count: The total number of frames that have been loaded. This provides context on how many frames were successfully extracted and are available for downstream usage.

Usage in ComfyUI Workflows

The LoadVideo node can be used in various ways within ComfyUI workflows:

  • Prep for ControlNet: Utilize video or GIF frames as input for ControlNet nodes, allowing for sophisticated video-to-video transformations.
  • Dynamic Input Streams: Integrate animated inputs into workflows, enabling dynamic and versatile media pipelines.
  • Sequential Processing: Process frames in order for tasks like stabilization, filtering, and effect application.

Special Features and Considerations

  • Supported Formats: The node supports multiple file types, including .gif, .webp, and common video formats like .mp4, .mov, .avi, and .webm.
  • File Management: Automatically manages files, ensuring only valid files from the designated input directory are used, which simplifies setup and reduces errors.
  • Flexibility: Offers the flexibility to selectively load sections of a video for processing, which enhances control and efficiency in managing workflows.
  • Integration: Fits seamlessly into AnimateDiff and Advanced ControlNet workflows within ComfyUI, helping extend their functionality to animated content.

Note

Ensure that necessary dependencies for processing specific video types (like OpenCV for certain video processing tasks) are properly installed to avoid compatibility issues. Additionally, consider optimizing frame start and limit options to enhance performance, particularly when dealing with large files or complex workflows.