Merge Image Channels
Rebuild an image from separate R, G, B (and alpha)
- red
- green
- blue
- alpha
- image
This is the "put it back together" half of a split-and-recombine workflow. If you've pulled an image apart into its red, green, and blue channels - to process each one separately, or to pack data into channels - MergeImageChannels is what reassembles them into a single image. It's a plumbing node for people doing channel-level work, which is a smaller crowd than most, but when you need it there's no clean substitute.
When you'd actually reach for it
A few real uses. Channel packing - game and 3D texture pipelines routinely stuff unrelated grayscale maps (roughness, metallic, ambient occlusion) into the R/G/B slots of one image to save texture memory; this node builds that packed image. Per-channel processing - occasionally you want to blur or adjust one channel without touching the others, which means splitting, operating, and merging back. Reconstructing after a split - any workflow that decomposed an image for analysis and needs it whole again.
Each channel goes in as its own IMAGE (grayscale content, read as intensity), and the node stacks them into the color channels of the result. It's the counterpart to a channel-splitter node; the two bracket whatever per-channel work you're doing in between.
The inputs and output
red,green,blue- threeIMAGEinputs, one per color channel. Each is treated as the intensity for that channel, so a grayscale image in theredslot becomes the red channel of the output.alpha(optional, aMASK) - supply this and you get a fourth channel, transparency, built from the mask. Leave it off for a plain opaque RGB image.
The output is a single image with those channels combined. Simple in, simple out.
How to install it
It's in kijai's KJNodes pack.
- ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, thenpip install -r ComfyUI-KJNodes/requirements.txt, restart.
No models, no dependencies.
Common issues & troubleshooting
Size mismatch errors. All three channel inputs - and the alpha, if used - have to be the same width and height. Feed it channels from different-sized sources and it'll error or misalign. Resize them to match before merging.
The colors come out wrong. Channel order is literal: whatever you wire into red is the red channel. If your result looks like the R and B are swapped, you crossed the wires - double-check which split output went into which input. It's the classic RGB/BGR footgun.
A channel looks blown out or dark. Each input is read as intensity, so a channel image that's brighter or darker than you intended shifts the whole color balance of the result. If one component dominates, the input for that channel is too hot - adjust its levels upstream.
You expected transparency but got opaque. The alpha input is optional and separate - you have to actually connect a mask to it. No mask, no alpha channel. And note it takes a MASK, not an image, so route your transparency in as a mask.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| red | IMAGE | — | |
| green | IMAGE | — | |
| blue | IMAGE | — | |
| alphaopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |