Nodes/MultiBand/Save Multiband Image
ComfyUI Node

Save Multiband Image

Pick a format that actually keeps your channels

By PozzettiAndrea·Created 9 months ago·Updated 22 days ago· 5
Save Multiband Image
  • multiband
  • saved_path
file_pathoutput/multiband
formatnpz

Save Multiband Image is the whole reason a stack of masks survives past the session. It writes a MULTIBAND_IMAGE to disk in one of four formats - and here's the part that actually matters: the formats are not interchangeable, because most of them can't hold what you're saving.

A plain PNG can't represent a 12-channel segmentation stack. That's the problem this pack exists to solve, and Save is where the answer becomes a file on disk. You pick .npy, .npz, .tiff, or .exr, and the node writes the (B, C, H, W) data out along with the channel names where the format allows.

Choosing the format

This is the decision to get right, because it's expensive to discover later:

  • .npz - the pack's default, and the best all-rounder. Compressed NumPy, stores the full array and the channel names plus metadata. If you're going to reload this with Load Multiband Image, this is the format to use.
  • .npy - plain NumPy, no metadata. Simple and fast, but channel names are gone on reload (auto-generated instead). Only if you don't care about labels.
  • .tiff - multi-page TIFF with channel names written into the ImageDescription. The format for interop: tifffile, ImageJ, QGIS and other tools read it. Good if the file needs to leave ComfyUI.
  • .exr - OpenEXR, named channels, HDR. The heavyweight for spectral/HDR work - but it's the one format that requires extra packages. Without pip install OpenEXR Imath you get an ImportError telling you exactly that.

The inputs

  • multiband - required, the stack to save.
  • file_path - default output/multiband. The extension can determine the format if you omit it, but honestly just set the format dropdown and use a clean name; the node appends the extension if you didn't.
  • format - npz, npy, tiff, or exr.

Output is a saved_path string, the actual location on disk - useful if you're scripting or want to display where it went. It's an output node, so it always runs, and it writes relative to wherever you run ComfyUI (the default output/ is ComfyUI's usual output directory).

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 and torch are assumed; tifffile (required in requirements.txt) covers TIFF. Only EXR needs the extra manual install.

Where people stumble

The classic is saving a stack as .npy and then reloading to find generic channel names - that's the format, not a bug. And don't reach for this to save a preview: the values it writes are the raw multiband data, which is what you want for round-tripping. If you caught the shape you care about with Preview Multiband, that wrote PNGs to temp; the actual data save is this node.

Categorymultiband/io

Inputs (3)

NameTypeDefaultDescription
multibandMULTIBAND_IMAGE
file_pathSTRINGoutput/multibandOutput file path (extension determines format if not specified)
formatCOMBOnpzOutput file format

Outputs (1)

NameTypeDescription
saved_pathSTRING