Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates loading and processing video frames from batch files for AI artists, enabling frame extraction and tensor conversion.
The LoadVideoBatchFrame
node is designed to facilitate the loading and processing of video frames from a batch of video files. This node is particularly useful for AI artists who need to work with video data in a structured and efficient manner. It allows you to extract specific frames from videos based on various modes of operation, such as loading a single video frame, incrementally loading frames, or randomly selecting frames from a batch. By converting video frames into a tensor format, this node enables seamless integration with machine learning models and other processing pipelines. The node's ability to handle different video formats and its flexibility in frame selection make it a powerful tool for video analysis and creative projects.
The mode
parameter determines the method of frame selection from the video batch. It offers three options: single_video
, incremental_video
, and random
. In single_video
mode, a specific frame from a specified video is loaded. The incremental_video
mode allows for sequential loading of frames, which is useful for processing videos in a continuous manner. The random
mode selects frames randomly, providing a way to introduce variability in frame selection. This parameter is crucial for defining how frames are accessed and can significantly impact the workflow depending on the chosen mode.
The seed
parameter is an integer that sets the seed for random number generation when the random
mode is selected. This ensures that the random selection of frames is reproducible, allowing for consistent results across different runs. The default value is 0, and it can range from 0 to 0xffffffffffffffff. By setting this parameter, you can control the randomness in frame selection, which is particularly useful for experiments requiring repeatability.
The index
parameter specifies the index of the video from which frames are to be loaded. It is an integer value with a default of 0, and it can range from 0 to 150,000. This parameter is essential when you want to target a specific video within a batch, especially in single_video
and incremental_video
modes. Adjusting this index allows you to navigate through the video batch and select the desired video for frame extraction.
The frame
parameter indicates the specific frame number to be loaded from the selected video. It is an integer with a default value of 0, and it can range from 0 to 999,999. This parameter is critical for pinpointing the exact frame you wish to extract, providing precise control over the frame selection process. It is particularly useful when you need to analyze or process a specific moment within a video.
The label
parameter is a string that allows you to assign a custom label to the video batch being processed. The default value is Video Batch 001
, and it is not multiline. This parameter is useful for organizing and identifying different batches of video data, especially when working with multiple datasets. By labeling your video batches, you can maintain better organization and clarity in your projects.
The path
parameter is a string that specifies the directory path where the video files are located. It is a required parameter and is not multiline. This parameter is fundamental as it directs the node to the location of the video files, enabling the loading and processing of video frames. Ensuring the correct path is provided is crucial for the successful execution of the node.
The pattern
parameter is a string that defines the file pattern to match video files within the specified directory. The default value is *
, which matches all files. This parameter allows you to filter and select specific video files based on their naming patterns, providing flexibility in handling different sets of video data. By using patterns, you can streamline the video selection process and focus on the files relevant to your task.
The frame
output parameter is an image tensor representing the loaded video frame. This tensor is formatted to be compatible with machine learning models and other processing tools, making it a versatile output for various applications. The frame tensor is normalized and converted to a format that facilitates further analysis or creative manipulation, serving as a crucial component in video processing workflows.
The filename_text
output parameter is a string that contains the filename of the video from which the frame was extracted. This output provides context and traceability, allowing you to identify the source of the frame. It is particularly useful for documentation and debugging purposes, as it helps track the origin of the processed data.
path
parameter is correctly set to the directory containing your video files to avoid errors related to file access.mode
parameter to tailor the frame selection process to your specific needs, whether you require sequential, random, or specific frame extraction.seed
parameter when using the random
mode to ensure reproducibility of your results, which is important for consistent experimentation.<path>
path
parameter is set to the correct directory containing your video files and that the path is accessible.<index>
and frame <frame>
index
and frame
parameters are within the valid range for your video files and adjust them accordingly.incremental_video
or random
modes when no valid frame is available for extraction.index
or frame
parameters if necessary.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.