Nodes/comfy-oiio/Load Image (OIIO)
ComfyUI Node

Load Image (OIIO)

The Node That Opens EXRs, DPX, DICOM, and Whole Frame Sequences

By melMass·Created 2 years ago·Updated 12 months ago· 13
Load Image (OIIO)
    • image
    • mask
    • xres
    • yres
    filepath
    precisionauto
    input_transformauto

    Stock ComfyUI's Load Image reads PNG, JPEG, WebP, and BMP. That's a short list, and every serious pipeline hits it fast: a linear EXR from a render, a DPX film scan, a DICOM medical image, a PSD, a TIFF, a camera RAW file - all "nope" for the built-in loader. Load Image (OIIO) is the door to that world. It reads everything OpenImageIO supports, which is essentially the entire imaging zoo: OpenEXR, DPX, Cineon, DDS, DICOM, FITS, GIF, HDR/RGBE, HEIF/HEIC/AVIF, JPEG-2000, JPEG XL, PSD, Ptex, RAW, RLA, SGI, Targa, TIFF, WebP, even movie formats via ffmpeg.

    The killer feature isn't the format list, though - it's sequences. Point this node at a folder and it stacks every readable image in there into one batch (so a folder of frames becomes a video-like tensor). Give it a numbered pattern like plate.####.exr or plate.%04d.exr and it resolves the actual frame range and loads it. If your work touches frame-accurate pipeline data, this is the node you've been missing.

    The inputs that matter

    • filepath - a plain string: a full path to a file, a folder, or a #/%04d sequence pattern. Note this is not the friendly dropdown picker that core Load Image gives you - you type or paste a path. Small surprise for beginners, fine once you know.
    • precision - auto (use the file's own bit depth), or force uint8, half, or float. auto is the right default; force half/float when you need to guarantee wide-range values for an EXR pipeline.
    • input_transform - auto (default) or a colorspace. With a colorspace set, the node converts the file's tagged colorspace into your chosen working space on load. Load a linear EXR and set this to scene_linear, and ComfyUI's previews stop looking dark and muddy.

    What comes out

    Four outputs, and only the first two usually matter:

    • image - a normal IMAGE tensor (batch, height, width, channels), ready for anything.
    • mask - the alpha channel, if the file has one (EXR and PNG with alpha get this), or a solid one if it doesn't. That makes it drop straight into inpainting or masking graphs.
    • xres / yres - the raw pixel dimensions of the source file. Handy for frame-accurate or metadata-checking workflows, and for sanity-checking that a sequence is uniform.

    The mechanics are honest: it opens the file with OIIO's ImageInput, reads it at your chosen precision, and hands the first three channels to image with alpha promoted to mask. If it reads uint8, values are normalized to 0–1 like everything else in ComfyUI.

    Installing it

    Same pack, same steps as the other OIIO nodes. ComfyUI Manager: search "comfy-oiio" (or "OpenImageIO"). Manual: cd ComfyUI/custom_nodes && git clone https://github.com/melMass/comfy_oiio, then pip install -r requirements.txt (openimageio and clique), restart.

    Gotchas

    • Extra channels get dropped. Beyond alpha, channels 5+ (depth, motion vectors in an EXR) are discarded - the TODO list in the source flags sublayer/channel support as not-yet-built.
    • Mixed-size folders get skipped, not crashed. Files in a batch that don't match the first image's dimensions are logged and skipped with a warning. If your "batch" comes back shorter than expected, that's why.
    • Misread colorspaces show up as "dark" images. A linear EXR read with input_transform left on auto keeps its linear values, and ComfyUI previews them as darker than they are. Set input_transform to match, or convert after load.
    • The %04d/# pattern handling wants the file's folder resolvable from wherever ComfyUI runs - keep paths absolute if you're scripting it.
    Categoryoiio

    Inputs (3)

    NameTypeDefaultDescription
    filepathSTRING
    precisionCOMBOauto4 options: auto, uint8, half, float
    input_transformCOMBOauto36 options: auto, scene_linear, lin_srgb, lin_rec709, Rec709, sRGB, +30

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    xresINT
    yresINT