ComfyUI Node

Load EXR Layer

Pull the beauty, depth, or normal pass out of a multi-layer file

By azhagurajpandians·Created 4 months ago·Updated about a month ago· 0
Load EXR Layer
    • image
    • mask
    • available_layers
    exr_path
    layer_namebeauty

    A multi-layer EXR is a single file that's secretly a folder: the beauty pass, the depth pass, the normals, the mask, all stacked under names like depth.Z and normal.X. Load EXR Layer reaches in and pulls one of those layers out as a usable IMAGE. It's the companion to the pack's Save EXR (Multi-Layer) - files saved there (or by any Nuke/Blender/rendering pipeline) come back out layer by layer.

    Why you'd want this: pass extraction is the boring, essential glue of VFX work. You render something with a depth pass so you can do real focus effects or displacement; you keep a mask pass so you can comp cleanly. In ComfyUI terms, this is how a depth layer becomes a tensor you can actually wire into a controlnet, an upscale, or a mask-based edit - and because EXR depth is float, it's genuinely useful depth, not an 8-bit picture of one (see the pack's Save EXR article on that trap).

    How it works

    The node reads the EXR with the OpenEXR python module and groups every channel by its layer prefix: beauty.R/beauty.G/beauty.B become the beauty layer, depth.Z becomes depth, normal.X/Y/Z becomes normal. Give it the layer name you want in layer_name and it returns:

    • image - the layer as a float tensor
    • mask - alpha-derived
    • available_layers - a string listing every layer it found

    That available_layers output is the underrated feature. Layer names in an EXR are whatever the writer decided to call them - beauty vs rgba vs Main - and guessing wrong is the classic failure. Wire available_layers into a Show Text node and you'll know exactly what to type next time.

    If the name you type isn't found, the node quietly falls back to beauty, then to whatever the first layer is. That fallback is convenient but it can also hide a typo - if you asked for normal and got the beauty pass back, check available_layers.

    The two inputs

    • exr_path - the file (absolute path, or a name relative to ComfyUI/input)
    • layer_name - default beauty; type the layer prefix you want

    That's the whole interface. No alpha modes, no frame handling - this is a single-frame utility.

    Install

    It's part of the ACES EXR Toolkit pack, so:

    cd ComfyUI/custom_nodes
    git clone https://github.com/azhagurajpandians/ComfyUI-ACES-EXR-Toolkit.git
    python -m pip install -r ComfyUI-ACES-EXR-Toolkit/requirements.txt
    

    Restart ComfyUI; it's under image/ACES + EXR. You'll want the openexr dependency installed - without it, layer extraction has nothing to work with and the node collapses to a flat load.

    Gotchas

    The silent beauty-fallback is the one to watch - it's a feature (robustness) that reads like a bug (wrong layer) when you've mistyped a name. Read available_layers first. And remember this node reads one file at a time; it's not a sequence loader. For animated EXR sequences, that's Load EXR / Load EXR From Path's job.

    Categoryimage/ACES + EXR

    Inputs (2)

    NameTypeDefaultDescription
    exr_pathSTRING
    layer_nameSTRINGbeauty

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    maskMASK
    available_layersSTRING