Preview Multiband Image
Actually look at channels that aren't RGB
- multiband
- preview
The fundamental problem with multiband images is that you can't see them. A 12-channel segmentation stack has no natural color, and a plain Preview Image node only understands three. Preview Multiband Image is the pack's answer: it renders channels as grayscale images and gives you a little channel switcher in the UI, so you can flip through the stack and actually inspect what you loaded.
ComfyUI's standard preview nodes write PNGs to the temp folder - this one does the same, but it's smarter about it. Instead of previewing just the channel you asked for, it renders every channel and lets the frontend swap between them without re-running the graph. That's the part that makes it feel nicer than anything stock: you get a selector under the image, click through channel_0, channel_1, channel_2, and the display updates instantly.
How it works
The node takes the (B, C, H, W) samples and, for each channel, normalizes and renders it as a grayscale preview. The channel_index widget (default 0) sets which channel you start on. It returns a preview IMAGE for that channel, and bundles the rest with per-channel min/max stats and the channel names so the custom JS widget can offer the switcher. All preview images land in the temp directory, like every other preview - so don't count on them surviving a restart; that's what Save Multiband Image is for.
The stats output is quietly useful: it computes global and per-sample min/max for every channel, which is how you can tell at a glance whether a channel is empty, saturated, or scaled oddly - very common with spectral or feature-map data that didn't land in [0, 1].
The inputs and output
- multiband - required, the thing you want to look at.
- channel_index - optional, which channel to display initially. Everything beyond that is the interactive widget.
Output is a single preview IMAGE (the currently selected channel, grayscale). It's an output node, so it always runs and the graph's cache works backward from it - leave it in your workflow while debugging, and it forces the upstream multiband nodes to execute.
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
Deps are numpy, torch, and tifffile - nothing exotic, no models. Do make sure the frontend files came along with the install; the interactive channel switcher lives in web/js/, and if you only grabbed the Python side the preview still works but you lose the selector.
Where it falls short
It's grayscale only. If you want to see three channels composited as a false-color RGB image, that's what Multiband to Image with a channel list like 0,1,2 is for - preview a 3-channel selection as color, or single channels here. Also, the preview is a representation, not a save: anything you want to keep goes through Save Multiband Image, which preserves the actual values instead of a normalized PNG.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| multiband | MULTIBAND_IMAGE | — | |
| channel_indexopt | INT | 00–1000 | Channel to show |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| preview | IMAGE | — |