ComfyUI Node

OCIO Read

Read an EXR, a frame sequence, or a camera master — and get it in the right color

By SlavaSexton·Created 2 months ago·Updated 3 days ago· 99
OCIO Read
    • image/sequence/video
    • alpha
    • fps
    • info
    • ComfyUI Video
    • metadata
    source
    frame_modeauto
    input_colorspacesRGB - Display
    output_colorspacesRGB - Display
    raw_datafalse
    start_frame0
    end_frame0
    frame_shift0
    missing_framesblack
    edge_modehold
    fps0.000

    OCIO Read is the front door of this pack and the reason most people install it. ComfyUI's own Load Image assumes every file is an sRGB PNG. This node reads a still, an image sequence, or a video from anywhere on disk and color-manages it on the way in - you tell it what colorspace the file is in, it converts to the working space you want out, and every downstream node sees a correctly-encoded plate instead of a gamma lie. It's Nuke's Read rebuilt for ComfyUI.

    The mechanism matters because the formats are real. EXR, DPX, HDR, TIFF, PNG, JPEG, BMP for stills and sequences (DPX decoded by the pack's own reader, because OpenCV returns nothing for a real 10-bit plate); MOV, MP4, MKV, AVI, WebM, MXF, M4V for movies via ffmpeg/ffprobe. Auto-detection does the guessing for you: EXR/HDR → ACEScg (scene-linear), a PQ or HLG clip → its Rec.2100 space, ProRes/DNxHD/MXF → Rec.1886 Rec.709 (a post codec in a professional container is a camera or mastering file, not a web deliverable), everything else → sRGB - Display. It's a guess from the container, and yours to overrule - a log-encoded ProRes carries no tag saying so and will be guessed as Rec.709.

    The inputs that matter

    • source - path to a file, a folder, a frame pattern like shot.####.exr, or a video, anywhere on disk (or relative to the input folder). Pick it with Open Files, or type it. Nothing gets copied; it reads in place.
    • frame_mode - auto (a numbered file with siblings becomes the whole sequence, Nuke's "grab sequence"), single (just this file), sequence (force-collapse), video. A folder is always a sequence.
    • input_colorspace / output_colorspace - the file's space in, your working space out (default sRGB - Display, which is what ComfyUI expects).
    • raw_data - Nuke's Raw Data: skip the conversion entirely, pass the file's values through untouched.
    • frame_shift - re-base the numbering so the first frame becomes 1 (a 1001-start sequence → 1). Flows to OCIO Write.
    • missing_frames - how to fill a gap inside the sequence: black, hold, or error. edge_mode - how to fill frames outside the range: hold / loop / bounce / black.

    What comes out

    Six outputs: the frames (image/sequence/video), alpha (the file's alpha as a MASK), fps, an info string (frames, resolution, format, range, missing frames), a native ComfyUI Video output so the color-managed batch feeds Load Video / Save Video / Video Combine downstream, and metadata - the plate's own header as JSON, wired into OCIO Write so camera, lens, editorial fields and start timecode survive into the file you deliver. There's also an on-node viewer with a Metadata panel that reads out what the file IS (resolution, codec, pixel format, colorspace, timecode) - what you see there is what travels down the metadata wire.

    Installing and the gotchas

    ComfyUI Manager → "ComfyUI-OCIO" → pick Nightly (the numbered registry entries are stale and flagged). Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SlavaSexton/ComfyUI-OCIO
    pip install -r ComfyUI-OCIO/requirements.txt
    

    Restart; it's under OCIO. Stills and sequences need nothing extra (OpenEXR, tifffile, OpenCV all installed by requirements); video needs a full ffmpeg build on your PATH - without it the movie container just isn't available, and the node says so. For EXR, the README says to set OPENCV_IO_ENABLE_OPENEXR=1 in the environment before ComfyUI starts. If your read looks washed out, it's almost always input_colorspace: tell it what the file actually is, and remember the auto-guess for log media is wrong by design - overrule it.

    CategoryOCIO

    Inputs (11)

    NameTypeDefaultDescription
    sourceSTRINGPath to a still, a sequence folder, one numbered frame or a video - anywhere on disk, or relative to the ComfyUI input folder. Use Open Files, or type it. A folder or one frame gives the whole sequence.
    frame_modeCOMBOautoauto: a numbered file with siblings becomes the whole sequence. single: just this file. sequence: force-collapse siblings. video: a movie clip. A folder is always a sequence; a video always its full clip. Your own choice is kept.
    input_colorspaceCOMBOsRGB - DisplayColorspace from the active OCIO (ACES) config.
    output_colorspaceCOMBOsRGB - DisplayColorspace from the active OCIO (ACES) config.
    raw_dataBOOLEANfalseNuke 'Raw Data': skip the colorspace conversion and pass the file's values through untouched (input/output colorspace are ignored).
    start_frameINT00–100000000First frame number to load (0 = from the detected start). Auto-filled to the range when you pick a source. Below the original range, edge_mode fills in.
    end_frameINT00–100000000Last frame number to load (0 = to the detected end). Above the original range, edge_mode fills in.
    frame_shiftINT00–100000000Re-base: the number the FIRST frame becomes downstream (Nuke frame offset). 0 = keep the source number (e.g. 86). Set 1 to start at 1, 10 to start at 10 - the whole range shifts with it. Flows to OCIO Write (first_frame + start_number).
    missing_framesCOMBOblackGaps INSIDE the sequence (e.g. 24 missing between 23 and 25): black = a black frame; hold = repeat the previous frame; error = stop. Missing frames are listed in 'info'.
    edge_modeCOMBOholdFrames OUTSIDE the original range (Nuke before/after): hold the end frame, loop the sequence, bounce (ping-pong), or black.
    fpsFLOAT0.0000–2400 = take from the video metadata (24 for stills). Flows to OCIO Write through the wire.

    Outputs (6)

    NameTypeDescription
    image/sequence/videoIMAGE
    alphaMASK
    fpsFLOAT
    infoSTRING
    ComfyUI VideoVIDEO
    metadataSTRING