ComfyUI Node

Load EXR Frames

Pull an EXR plate sequence back into the graph

By spacepxl·Created 3 years ago·Updated 6 months ago· 102
Load EXR Frames
    • RGB
    • alpha
    • batch_size
    • start_frame
    filepathpath/to/frame%04d.exr
    tonemapsRGB
    start_frame1001
    end_frame1001

    LoadEXR handles a folder of EXRs. LoadEXRFrames is the one you want when those EXRs are a numbered sequence - render.1001.exr, render.1002.exr, and so on, the way VFX and compositing tools write frames. You give it the pattern and a frame range, and it hands you the whole run as a single batched IMAGE, ready for upscaling, img2img, video-to-video, or whatever you're doing to it.

    If you've got footage coming out of Resolve or Nuke as EXR plates, this is the front door back into ComfyUI.

    How it works

    The key input is filepath, and the default shows the convention: path/to/frame%04d.exr. The %04d is a placeholder that means "zero-padded four-digit frame number" - the node substitutes each frame in your start_frameend_frame range and loads them in order, concatenating everything into one tensor batch. It also returns start_frame as an output so downstream logic knows where the sequence begins, and batch_size tells you how many frames actually made it in.

    There's a second mode hiding in the code: if the literal filepath you type exists on disk, it loads that one file and ignores the frame range - batch of one. That's handy for a single absolute file, but it's also a trap if you typo a path and it happens to resolve. Most of the time you want the %04d version.

    Same tonemap choice as LoadEXR: linear keeps the raw scene-linear float values, sRGB makes it look right on a monitor, Reinhard compresses HDR range first. For processing, linear. For eyeballing, sRGB.

    Inputs and outputs

    Inputs: filepath, tonemap, start_frame, end_frame. That's it - this one has no cap/skip/nth controls; the frame range is the control. Frame numbers are capped at 9999 in the UI, which is fine for a sequence; if you're working with frame 100000+ this node isn't for you.

    Outputs: RGB (IMAGE), alpha (MASK), batch_size (INT), and start_frame (INT). Wire RGB straight into a KSampler for img2vid, an upscaler, or a frame-consistency pass - everything downstream treats it as one batch.

    Install

    It's part of spacepxl's ComfyUI-HQ-Image-Save pack. ComfyUI Manager: search ComfyUI-HQ-Image-Save, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/spacepxl/ComfyUI-HQ-Image-Save
    

    Dependencies are just imageio and opencv-python; no model downloads. One thing to remember: if you hit the "OpenEXR codec is disabled" error, your OpenCV build lacks the EXR codec - the standard opencv-python wheel has it, and the pack enables it via OPENCV_IO_ENABLE_OPENEXR=1 at import.

    Gotcha: missing frames stop the load

    The load is strict - the first frame in the range that doesn't exist raises an exception instead of skipping. If you set end_frame past the last rendered frame, the whole node fails. Check the tail of your sequence before you ask for a full range.

    CategoryHQ-Image-Save

    Inputs (4)

    NameTypeDefaultDescription
    filepathSTRINGpath/to/frame%04d.exr
    tonemapCOMBOsRGB3 options: linear, sRGB, Reinhard
    start_frameINT10010–9999
    end_frameINT10010–9999

    Outputs (4)

    NameTypeDescription
    RGBIMAGE
    alphaMASK
    batch_sizeINT
    start_frameINT