Split Images π₯π ₯π π ’(SplitImages)
This node takes a tensor of type `IMAGE` as input, which typically represents a batch containing multiple image frames.
Split Images
The Split Images π₯π
₯π
π
’ node receives a tensor of type IMAGE as input, which typically represents a batch containing multiple image frames.
The Split Images node is a tool for image sequence processing. Its core function is to split an input image sequence into two independent image groups based on a specified index position. It is particularly suitable for workflows that require grouping or segmenting a batch of images, such as extracting a specific frame range from a video.
Node Function
This node receives a tensor of type IMAGE as input, which typically represents a batch containing multiple image frames. Using an integer index split_index, the node internally slices the input sequence along the batch dimension. Images before the index are grouped into the first set, while images at and after the index are grouped into the second set. It then outputs these two new image sequences along with the number of images each contains.
Node Parameter Description - Split Images π₯π ₯π π ’
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
images | IMAGE | Yes | - | - | images (Input Parameter): Input an image sequence (batch). The node will split this sequence along the batch dimension. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
split_index | INT | Yes | 0 | BIGMIN - BIGMAX (Step: 1) | split_index (Input Parameter): An integer index specifying the split position. The range has no preset limit, with a step size of 1. Images before the index belong to the first group; images at and after the index belong to the second group. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| IMAGE_A | IMAGE | IMAGE_A (Output Parameter): The first group of image sequences obtained after splitting. |
| A_count | INT | A_count (Output Parameter): The number of image frames contained in the first image sequence group. |
| IMAGE_B | IMAGE | IMAGE_B (Output Parameter): The second group of image sequences obtained after splitting. |
| B_count | INT | B_count (Output Parameter): The number of image frames contained in the second image sequence group. |
Usage Scenarios
A typical use case is in video processing workflows. When you need to split a long video's frame sequence at a specific point (e.g., a scene change) and apply different image processing nodes (such as different filters or upscaling models) to the two parts separately, you can use this node for the split. Another example is in batch image generation, where it can be used to manually divide a batch of generated results into two groups based on quality or content for subsequent different saving or evaluation operations.
Notes
When using this node, note that the value of split_index should be between 0 and the total number of frames in the input image sequence. If the index is 0, the first group will be empty. If the index is equal to or greater than the total number of frames, the second group will be empty. The node will output empty tensors, and their corresponding counts will be 0.
Split Images π₯π ₯π π ’ Node Source Code Link
The Split Images π₯π ₯π π ’ node is from the ComfyUI-VideoHelperSuite node package.
Comments
Sign in with GitHub to join the discussion.