Merge Image Channels(MergeImageChannels)
This node technically receives three separate image tensors as inputs, corresponding to the red, green, and blue components of the RGB color model, respectively.
Merge Image Channels
The Merge Image Channels node technically receives three independent image tensors as inputs, corresponding to the red, green, and blue components of the RGB color model.
The Merge Image Channels node is an image processing tool whose core function is to merge image data representing the red, green, and blue channels separately, ultimately generating a complete color image. It can also optionally add a transparency channel to the generated image, thereby supporting image formats with an Alpha channel.
Node Function
This node technically receives three independent image tensors as inputs, corresponding to the red, green, and blue components of the RGB color model. It constructs a new image by stacking specific channels from these input tensors. If an Alpha mask is provided, it will be appended as the fourth channel to the image. The final output is an image tensor containing three or four channels, with its data type consistent with the inputs.
Node Parameter Description - Merge Image Channels
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
red | IMAGE | Yes | - | - | Provides the red channel data required for image composition. Input should be in image format. |
green | IMAGE | Yes | - | - | Provides the green channel data required for image composition. Input should be in image format. |
blue | IMAGE | Yes | - | - | Provides the blue channel data required for image composition. Input should be in image format. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
alpha | MASK | No | None | - | - |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| image | IMAGE | Outputs the merged image in RGB or RGBA format. |
Usage Scenarios
In practical workflows, this node is commonly used to synthesize channel data from different sources or processing stages. For example, you can use this node to recombine three single-channel images that have undergone sharpening, color correction, and noise reduction processing separately into an optimized full-color image. In advanced compositing, its Alpha channel support can also be utilized to create custom transparent areas for the merged image.
Notes
When using this node, ensure that the three input images have exactly the same dimensions and batch count; otherwise, the node will not be able to perform the merge operation correctly. If an Alpha mask is provided, its dimensions must also match the other input images.
Merge Image Channels Node Source Code Link
The Merge Image Channels node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.