Nodes/MultiBand/Multiband to Image
ComfyUI Node

Multiband to Image

Pick any three channels and make them RGB

By PozzettiAndrea·Created 9 months ago·Updated 21 days ago· 5
Multiband to Image
  • multiband
  • image
channels0,1,2

Multiband to Image is the exit door - the node that turns a MULTIBAND_IMAGE back into a normal ComfyUI IMAGE that every stock node can consume. It takes your pick of three channels and packs them into an RGB image, which is the bridge that keeps this pack from being a walled garden. Load a stack, extract three channels as a viewable, saveable, processable image, and you're back in ordinary ComfyUI territory.

Its two practical jobs: display and interchange. For display, it's the color counterpart to Preview Multiband - preview is grayscale per channel, this composites three channels as color, including false-color combos like 2,1,0 or 3,0,1. For interchange, it's how multiband data leaves the pack: extract the three channels that matter, hand them to an upscaler, a save node, a detailer - anything that speaks IMAGE.

How it works

The channels widget (default 0,1,2) lists which channels become R, G, and B, in that order. The node selects them, reorders to (B, H, W, 3), and clamps values into [0, 1] so the result is a well-formed IMAGE. If you list fewer than three, it pads by repeating the last channel; indices are clamped to the valid range, so out-of-bounds values silently snap to the last channel rather than crashing.

The clamp is worth knowing: if your source data lives outside [0, 1] (un-normalized spectral or feature values), the output clips instead of scaling. Run a normalization step first if you want to see the full dynamic range as an image.

The inputs

  • multiband - required, the stack you're extracting from.
  • channels - optional, comma-separated indices, default 0,1,2. Order defines RGB order.

Output is a single image, ready for preview, save, or any downstream IMAGE consumer.

Installing the pack

From ComfyUI-Multiband. ComfyUI Manager → search "ComfyUI-Multiband" → Install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-Multiband.git
pip install -r ComfyUI-Multiband/requirements.txt

numpy, torch, tifffile - no model downloads, pure tensor rearrangement.

A note on the naming trap

The default 0,1,2 assumes the first three channels are what you want, which is true for data that entered as RGB but a guess for anything else. If you've got a 20-channel stack, the channels you want are probably not 0,1,2. Check the names (the loaders output channel_names), then use those indices - or run Select Multiband Channels first with the names you actually care about, then convert the slimmed result. Channel order here is the color mapping, and getting it wrong is the single most common way this node produces a "wrong looking" image.

Categorymultiband/convert

Inputs (2)

NameTypeDefaultDescription
multibandMULTIBAND_IMAGE
channelsoptSTRING0,1,2Comma-separated channel indices (e.g., '0,1,2' or '2,1,0')

Outputs (1)

NameTypeDescription
imageIMAGE