Merge Images π₯π ₯π π ’(MergeImages)
In terms of technical implementation, this node first checks whether the dimensions of the two sets of input images are consistent.
Merge Images
The Merge Images π₯π ₯π π ’ node, in its technical implementation, first checks whether the dimensions of the two input image sets are consistent.
The Merge Images node is a tool for image processing. Its core function is to merge two sets of input images (images_A and images_B) into a single image batch. It intelligently handles images of different sizes, ensuring they can be seamlessly combined to provide a unified data source for subsequent image processing steps.
Node Functionality
In its technical implementation, this node first checks whether the dimensions of the two input image sets are consistent. If the sizes differ, the node decides which set of images to use as the reference for scaling based on the user-selected "merge strategy," and uses the specified "scale method" and "crop method" to adjust the size of the other image set. After unifying the dimensions, the node concatenates the two image sets along the batch dimension, ultimately outputting a merged image tensor and the total count of merged images.
Node Parameter Description - Merge Images π₯π ₯π π ’
Inputs
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
images_A | IMAGE | Yes | - | - | images_A (Input Parameter): The first batch of images to be merged. |
images_B | IMAGE | Yes | - | - | images_B (Input Parameter): The second batch of images to be merged. |
merge_strategy | MERGESTRATEGIES | Yes | - | - | Match B group, Match smaller size, Match larger size. |
scale_method | SCALEMETHODS | Yes | - | - | Bicubic, etc. |
crop | CROPMETHODS | Yes | - | - | Disabled, etc. |
Outputs
| Parameter Name | Data Type | Description |
|---|---|---|
| IMAGE | IMAGE | IMAGE (Output Parameter): The merged, unified image batch. |
| count | INT | count (Output Parameter): The total number of images contained in the merged batch. |
Usage Scenarios
This node is highly useful in practical workflows. For example, when you need to compare, blend, or feed two sets of image results generated using different models or parameters as a single batch into the next node (such as an upscaler or animation generator), you can use the Merge Images node. It ensures data format consistency and simplifies the construction of complex pipelines.
Notes
It is important to note that this node only performs image concatenation and does not involve pixel-level fusion (such as alpha blending). The order of images in the merged batch is: all images from images_A first, followed by all images from images_B.
Merge Images π₯π ₯π π ’ Node Source Code Link
The Merge Images π₯π ₯π π ’ node is from the ComfyUI-VideoHelperSuite node package.
Comments
Sign in with GitHub to join the discussion.