Nodes/MultiBand/Load Multiband Image from Path
ComfyUI Node

Load Multiband Image from Path

When the file isn't in your input folder

By PozzettiAndrea·Created 9 months ago·Updated 21 days ago· 5
Load Multiband Image from Path
    • multiband
    • num_channels
    • channel_names
    file_path
    normalizefalse

    Load Multiband Image from Path is the loader for people who keep their data somewhere other than ComfyUI/input/. Same formats, same outputs, same underlying machinery as the dropdown-based Load Multiband Image - but instead of picking a file from the input folder, you type (or wire in) an absolute path. One string widget, any location the ComfyUI server can read.

    It earns its keep in two situations. First: your multiband files live in a shared data directory, a project folder, or a network mount, and you don't want to copy them into input/ every time. Second: the path is dynamic - you're iterating over a directory of files, or a filename is being built by another node, and the file keeps changing between runs. Because the widget is a plain string, anything upstream can feed it.

    How it works

    The node checks the path exists (clear FileNotFoundError if not), dispatches on extension - .npy, .npz, .tiff/.tif, .exr - and returns the loaded multiband. Format behavior is identical to the sibling loader: npz and tiff carry channel names through metadata, npy doesn't, and exr needs the optional OpenEXR Imath packages or it raises an ImportError with the install command in the message.

    One deliberate difference: normalize defaults to False here, where the dropdown loader defaults to True. The path variant assumes you're working with scientific or spectral data where the raw value range matters and shouldn't be silently scaled. Flip it on if your file is ordinary 8-bit-style image data in the 0–255 range and you want it brought to [0, 1].

    The inputs and outputs

    • file_path - required, absolute path to the file. Relative paths won't resolve; give the full thing.
    • normalize - optional, default off.

    Outputs match the other loader: multiband, num_channels (INT), and channel_names (STRING). It also hashes the file to detect changes, so editing the file on disk triggers a reload on the next run.

    Installing the pack

    Part of 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
    

    Same deps as the whole pack: numpy, torch, tifffile (required, so TIFF works immediately); OpenEXR + Imath optional for EXR.

    Which loader should you use?

    For one-off work, the dropdown loader is easier - no typing paths. Use the path version when the file location is outside input/, when the filename changes programmatically, or when you want the raw (unnormalized) values by default. If you ever see "File not found" from this node, the path string is the first suspect - a missing leading slash or a trailing space will do it.

    Categorymultiband/io

    Inputs (2)

    NameTypeDefaultDescription
    file_pathSTRINGAbsolute path to multiband file (.npz, .npy, .tiff, .exr)
    normalizeoptBOOLEANfalseNormalize values to [0, 1] range

    Outputs (3)

    NameTypeDescription
    multibandMULTIBAND_IMAGE
    num_channelsINT
    channel_namesSTRING