Image Stack Channels
Glue two images together channel-wise
- image_a
- image_b
- IMAGE
This is a plumbing node, and I'll be straight with you: if you don't already know you need it, you almost certainly don't. JWImageStackChannels takes two images and concatenates them along the channel axis. Not side by side, not overlaid, not blended. It stacks the color channels of image_a and image_b into one taller stack. An RGB (3 channels) plus another RGB gives you a 6-channel tensor. An RGB plus a single-channel grayscale gives you 4 channels. It's the kind of thing you reach for when a downstream node expects a specific multi-channel layout and you're assembling it by hand.
It comes from jamesWalker55's "Various ComfyUI Nodes by Type" pack, a collection of small utility nodes grouped by purpose. This one lives in the channel-ops file, and it's about as low-level as ComfyUI nodes get.
When this is actually useful
Most ComfyUI images are 3-channel RGB, and most of the time you never think about channels at all. Stacking them by hand only comes up in a few niches: packing several grayscale maps (say, three separate masks or depth-style outputs) into one multi-channel image so a custom node can read them together, building an RGBA-style image by tacking an alpha or mask onto an RGB, or preparing data for some node that was written to expect channels in a particular order. If none of those describe what you're doing, this isn't your node, and that's fine. The whole point of a "various nodes by type" pack is that you take the one part you need and ignore the other ninety.
Inputs and output
There are only two inputs and they're both required:
- image_a: the first image. Its channels come first in the stack.
- image_b: the second image, appended after.
The output is a single IMAGE, except now it carries the combined channel count. Order matters, since a then b is not the same as b then a if some later node reads channel positions.
Installing it
ComfyUI Manager is the easy path: search "Various ComfyUI Nodes by Type" or jamesWalker55, install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/jamesWalker55/comfyui-various
then restart ComfyUI. No models, no extra dependencies. It's pure tensor work. (The only pip install mentioned anywhere in the pack's README is OpenEXR, and that's for a different node entirely.)
The gotchas that will bite you
First and most important: the two images need to be the same width and height. You're gluing channels together, so the spatial dimensions have to line up. Feed it a 512x512 and a 768x768 and you'll get an error, not a resize. If they don't match, run one of them through a resize node first (JWImageResize or JWImageResizeToSquare in this same pack, or core ComfyUI's resize) so both are identical in size.
Second: the output is not a normal viewable image once you've stacked past 3 channels. A standard Preview Image or Save Image node expects RGB. Hand it a 6-channel stack and you'll either get garbage, only the first three channels shown, or an outright error depending on the node. So don't wire this straight into a preview and wonder why it looks broken. This output is meant to feed a specific node that knows what to do with the extra channels, full stop.
If you find yourself here without a clear consumer for the stacked result, step back. There's a decent chance a simpler node (a mask combine, an image blend, an RGBA assembler) is what you actually wanted, and this channel-concat is a level lower than the problem you're solving.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image_a | IMAGE | — | |
| image_b | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |