Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates loading and managing video files from specified directory, offering streamlined approach for handling video data in various modes.
The LoadVideoDirectoryV2
node is designed to facilitate the loading and management of video files from a specified directory, offering a streamlined approach for handling video data in various modes. This node is particularly beneficial for AI artists who need to work with video data in a flexible and efficient manner. It allows you to load videos based on different selection modes such as single, incremental, or random, providing versatility in how video data is accessed and utilized. The node ensures that only valid video files are processed, and it can handle video selection dynamically based on user-defined parameters. This capability is essential for tasks that require batch processing of video files or when working with large video datasets, as it simplifies the process of accessing and managing video content.
The path
parameter specifies the directory path where the video files are located. It is crucial for the node to know where to look for the video files to load. The path must be a valid directory on your system; otherwise, the node will raise an error. There is no default value for this parameter, and it must be provided by the user.
The pattern
parameter allows you to define a specific pattern for matching video files within the directory. This can be useful if you want to filter the files based on certain criteria, such as file extensions or naming conventions. The default value is '*'
, which means all files will be considered.
The index
parameter determines which video file to load based on its position in the directory. It is used in conjunction with the mode to select the appropriate video. The default value is 0
, and it should be a non-negative integer.
The skip_frames
parameter specifies the number of frames to skip at the beginning of the video. This can be useful if you want to start processing the video from a specific point. The default value is 0
, meaning no frames are skipped.
The max_frames
parameter defines the maximum number of frames to load from the video. This allows you to limit the amount of data processed, which can be beneficial for performance reasons. The default value is 0
, indicating that all frames will be loaded.
The mode
parameter determines the method of video selection. It can be set to single_video
, incremental_video
, or random
, each offering a different approach to selecting videos from the directory. The default mode is single_video
.
The seed
parameter is used to initialize the random number generator when the mode is set to random
. This ensures that the selection of videos is reproducible. The default value is 0
.
The label
parameter allows you to assign a label to the batch of videos being processed. This can be useful for organizational purposes or when managing multiple video batches. The default value is 'Video Batch 001'
.
The force_rate
parameter is used to enforce a specific frame rate when processing videos. This can be important for ensuring consistency across different video files. The default value is 0
, which means the original frame rate of the video is used.
The meta_batch
parameter is an optional parameter that can be used to pass additional metadata or batch information. This can be useful for advanced processing scenarios where additional context is needed.
The unique_id
parameter is an optional identifier that can be used to uniquely identify the video batch being processed. This can be helpful in scenarios where multiple batches are being handled simultaneously.
The memory_limit_mb
parameter sets a limit on the amount of memory (in megabytes) that can be used during video processing. This can help prevent excessive memory usage and ensure that the node operates within the available system resources. The default value is 0
, indicating no specific limit.
The vae
parameter is an optional parameter that can be used to specify a Variational Autoencoder (VAE) model for processing the video data. This can be useful for tasks that involve video encoding or transformation.
The frames_tensor
output is a tensor containing the video frames that have been loaded and processed. This tensor is essential for any further processing or analysis of the video data, as it represents the actual visual content in a format that can be easily manipulated.
The video_id
output is an integer that represents the index of the video file that was loaded. This is useful for tracking which video was processed, especially when working with large datasets or in batch processing scenarios.
The meta_batch
output is an optional dictionary that contains metadata or additional information about the video batch. This can include details such as processing parameters or contextual information that may be relevant for further analysis.
The additional_info
output is a dictionary that provides extra information about the video processing, such as any warnings or notes that were generated during the loading process. This can be helpful for debugging or understanding the context of the video data.
The filename
output is a string that contains the name of the video file that was loaded. This is important for identifying the source of the video data and for any file management tasks that may be necessary.
path
parameter is correctly set to a valid directory containing video files to avoid errors.pattern
parameter to filter specific video files if you have a large directory with mixed file types.skip_frames
and max_frames
parameters to optimize performance and focus on specific parts of the video.random
mode, set a specific seed
value to ensure reproducibility of video selection.memory_limit_mb
to prevent excessive memory usage, especially when processing high-resolution videos.<path>
path
parameter is set to a valid directory and that the directory exists on your system.<video_id>
index
parameter is within the valid range of available video files in the directory.<index>
skip_frames
and max_frames
parameters are set correctly.<error_message>
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.