Nodes/ComfyUI-Raw-Image/Load Raw Image
ComfyUI Node

Load Raw Image

ComfyUI won't open your camera's RAW files? This node will.

By dimtion·Created about a year ago·Updated about a year ago· 5
Load Raw Image
    • IMAGE
    image
    use_auto_brighttrue
    bright_adjustment1.0
    highlight_modeclip

    ComfyUI's built-in Load Image is happy to eat JPEGs and PNGs, but hand it a .CR3 off a Canon or a .NEF off a Nikon and it just shrugs. That's the entire problem this pack exists to solve: one node, Load Raw Image, that demosaics a camera RAW file on your machine and hands ComfyUI a perfectly normal image tensor. No API, no key, no cloud - it's the rawpy library (the Python wrapper around LibRaw) doing the heavy lifting locally.

    If you shoot with a real camera and want your own photos in an img2img, a ControlNet, an upscale, or a restoration workflow, this is the node you've been missing. Before it, the drill was: develop the RAW in Lightroom or darktable, export a TIFF or PNG, then finally import that into ComfyUI - which kinda defeats the point of having shot RAW in the first place. This cuts the middle step.

    How it works

    One class, LoadRawImage, and a very short pipeline: rawpy.imread() on your file, then postprocess() to turn the sensor data into a viewable RGB image. Because it rides on LibRaw, anything that engine can read comes through - Canon CR2/CR3, Nikon NEF, Sony ARW, Fuji RAF, DNG, and a long list beyond. The image is converted to RGB, normalized to the 0–1 float range ComfyUI expects, and emitted as a standard IMAGE tensor. So it plugs into anything the built-in loader would feed: a VAE encode, an img2img refiner, a ControlNet preprocessor, you name it.

    One honest caveat, because it matters: the output is 8-bit. The node calls rawpy with output_bps=8, then scales to floats. So this gets your RAW into the workflow without the Lightroom detour, but it doesn't preserve the camera's full dynamic range - it's "develop the photo and bring it in," not a linear high-bit-depth pipeline. For color-critical HDR work you'd want a fancier setup; for most img2img and reference use, it's plenty.

    The settings that matter

    Only four inputs, and two of them you'll probably never touch:

    • image - a dropdown of everything in your ComfyUI input/ folder. Same upload trick as the built-in Load Image: drag a file onto the widget to drop it in.
    • use_auto_bright (default on) - rawpy's automatic brightness curve, the thing that makes a dark, flat-looking RAW come out looking like a photo. Leave it on.
    • bright_adjustment (0.1–3.0, default 1.0) - a brightness multiplier on top of auto. Crank it past 1 when the auto pass isn't enough.
    • highlight_mode (default clip) - how blown-out highlights are handled: clip, ignore, blend, or reconstruct. If your skies turn to featureless white, poke around here.

    Installing it

    ComfyUI Manager is the easy route: search ComfyUI-Raw-Image (or just "raw"). Manually, it's the standard song:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/dimtion/comfyui-raw-image.git
    pip install -r requirements.txt
    

    Then restart ComfyUI. No model files to download - the only dependency of note is rawpy, plus numpy and pillow you already have. The author is dimtion (Loïc Carr), and this is a small, single-purpose MIT pack - one node, nothing to configure beyond install.

    Where people get burned

    • rawpy is a compiled wheel. If pip can't find one for your Python version, the install fails and you're into compiler territory. And because the node imports rawpy at load time, a missing dependency means the node doesn't appear in your menu at all - check the console log if it's silent.
    • The dropdown lists every file in input/, not just RAW files. The node has no extension filter, and validation only checks the file exists. Pick a .jpg by accident and you get a runtime Failed to load RAW image error, not a friendly heads-up.
    • It re-hashes the whole file on every queue. The node's change detection reads and SHA-256s your image each run, which is fine for a photo but adds up if you're pointing it at a memory card full of 50MB frames.

    It's a niche tool for a niche workflow, but if that workflow is yours, it's the difference between a RAW round-trip through a photo editor and just... loading the photo.

    Categoryimage

    Inputs (4)

    NameTypeDefaultDescription
    imageCOMBOImage to load.
    use_auto_brightoptBOOLEANtrueautomatic increase of brightness
    bright_adjustmentoptFLOAT1.00.1–3
    highlight_modeoptCOMBOclip4 options: clip, ignore, blend, reconstruct

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE