Nodes/ComfyUI_ColorMod/Load Image (HDR)
ComfyUI Node

Load Image (HDR)

Load a real HDR file and keep the range PNG would throw away

By city96·Created 3 years ago·Updated 2 years ago· 111
Load Image (HDR)
    • IMAGE
    image

    ComfyUI's stock image loader reads PNGs and JPGs: 8-bit, clamped to [0, 1], end of story. Load Image (HDR) reads .hdr files instead - the Radiance format that stores actual floating-point brightness. A pixel that's 4x brighter than white comes in at 4.0, and you get to decide what to do with that. That's the entire difference, and it's the entire point.

    How it works

    It reads the file with OpenCV's cv2.imread in raw mode (no auto-scaling) and flips it back from OpenCV's BGR ordering to the RGB that ComfyUI expects. The result is a plain IMAGE tensor - same shape, same channels - just with values that can go below 0 and well above 1. The node prints the loaded min/max to your console so you can see what you're working with. It also hashes the file so the workflow re-runs when you edit the .hdr on disk.

    The one input

    • image - a dropdown of .hdr files in your input/ folder. Drop your file into ComfyUI/input/, refresh, and it appears. Output is a single IMAGE.

    Installing

    Part of the ColorMod pack, needs OpenCV (opencv-contrib-python):

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

    Restart, or install via ComfyUI Manager ("ComfyUI_ColorMod"). Missing from the menu → opencv isn't installed; the console warning "Can't find opencv!" tells you exactly that.

    The traps, honestly

    • Do not feed HDR values straight into a VAE or UNet. The model was trained on [0, 1] data and will do weird things with 4.0-brightness pixels. The README says it plainly: using HDR images directly without tonemapping is probably useless and can cause errors. Wire this into a tonemap node (Tonemap (simple), (Reinhard), etc.) or a ColorMod node with clipping off before anything touches a sampler.
    • It only lists .hdr files. Not .exr, not .tif. If your file isn't in the dropdown, it's either not .hdr or not in input/.
    • "It looks blown out / black." That's HDR being HDR - you're looking at untonemapped values. The whole workflow is: load HDR → tonemap → then preview or save.

    Where does a beginner actually get an HDR file? Either you saved one earlier with this pack's Save Image (HDR), or you're testing the tonemap nodes with a stock HDR image. Both work; just remember the value of the file is in what you do with it after loading.

    CategoryColorMod/hdr

    Inputs (1)

    NameTypeDefaultDescription
    imageCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE