Visit ComfyUI Online for ready-to-use ComfyUI environment
Create new image batch by selecting specific range from existing batch, essential for image sequence tasks with optional masks.
The GetImageRangeFromBatch
node is designed to create a new batch of images by selecting a specific range of images from an existing batch. This node is particularly useful when you need to extract a subset of images from a larger collection for further processing or analysis. By specifying a starting index and the number of frames, you can precisely control which images are included in the new batch. This functionality is essential for tasks that require working with specific segments of image sequences, such as animation, video processing, or any scenario where you need to isolate and manipulate a particular range of images. Additionally, the node can handle optional masks, allowing for more complex operations involving both images and their corresponding masks.
This parameter represents the input batch of images from which a range will be selected. It is a required parameter and must be provided for the node to function. The images should be in a format that the node can process, typically as a list or array of image data.
The start_index
parameter specifies the starting point in the input batch from which the selection of images will begin. It is an integer value with a default of 0, a minimum of -1, and a maximum of 4096. If set to -1, the selection will start from the end of the batch minus the number of frames specified. This parameter is crucial for determining the exact position in the batch where the extraction starts.
The num_frames
parameter defines the number of consecutive images to be included in the new batch, starting from the start_index
. It is an integer value with a default of 1, a minimum of 1, and a maximum of 4096. This parameter allows you to control the size of the new batch by specifying how many images to extract.
This optional parameter allows you to provide a corresponding batch of masks for the images. If provided, the node will also extract the specified range of masks along with the images. This is useful for operations that require both images and their associated masks, ensuring that the masks are aligned with the selected images.
The IMAGE
output parameter contains the new batch of images that were selected based on the specified start_index
and num_frames
. This output is essential for any subsequent processing or analysis tasks that require the extracted subset of images.
The MASK
output parameter contains the new batch of masks corresponding to the selected images, if the masks
input parameter was provided. This output ensures that any operations involving masks can proceed with the correct subset of masks aligned with the images.
start_index
to -1 and adjust the num_frames
accordingly.start_index
and num_frames
values are within the valid range of the input batch to avoid errors.masks
parameter if you need to work with both images and their corresponding masks, ensuring they are processed together.start_index
is set to a value that is outside the valid range of the input batch.start_index
is within the bounds of the input batch. Adjust the value to ensure it falls within the valid range.start_index
and num_frames
does not exceed the total number of images in the input batch. Adjust the num_frames
or start_index
to fit within the batch size.© Copyright 2024 RunComfy. All Rights Reserved.