Gear · LogC3 Decode + Save EXR
Your HDR LoRA spits out a flat gray image. This node turns it into real HDR EXRs
- image
- hdr_linear
- tonemapped_preview
- exr_paths
If you've run an HDR video LoRA, you've probably stared at the output and thought "…that's just a normal image." It's not, and that's the whole problem. The LumiVid V9 / V5b family, the klein_step* models, the LTX-2 HDR IC-LoRA - they're trained on LogC3-encoded HDR footage, which crams a huge dynamic range into the same old [0,1] image space. Looked at on a monitor it reads as a flat, slightly gray log image. But those code values actually hold around 8.3 stops of highlight room above mid-gray, and any node that treats the output as ordinary LDR is quietly throwing all of it away.
Gear · LogC3 Decode + Save EXR is the decoder. It runs the ARRI LogC3 inverse curve (EI 800) and writes out what the model actually meant: a float16 EXR where the sun is at 55.0, not 0.98. That's the difference between "a bright picture" and footage you can push around in a real color pipeline.
How it works
The curve lives in gear/logc3.py as a per-channel torch transfer function - no OCIO, no external color-science library, just the LogC3 constants matched to the reference the HDR LoRA trainers use. For each frame in your batch it:
- decompresses
[0,1]→ scene-linear (values exceed 1.0, ceiling ~55 linear), - builds a Reinhard tonemap at your chosen
preview_evjust for the graph thumbnail, - writes a float16, ZIP-compressed EXR through OpenCV's OpenEXR backend.
So you get three outputs: hdr_linear (the real HDR tensor), tonemapped_preview (so the graph UI shows something sensible), and exr_paths (a newline-joined string of absolute paths to the saved files).
Inputs that matter
Honestly, only a few:
- image - the
[0,1]LogC3 output of your HDR LoRA. Don't clamp it first; let this node do the math. - filename_prefix - accepts ComfyUI tokens (
%year% %month% %day% %hour% %minute% %second% %batch_num%). Default drops files inComfyUI/output/gear_hdr/with a timestamp, and an auto-incrementing counter is appended so EXRs never overwrite. - preview_ev - an exposure shift applied only to the preview thumbnail, not the EXR. Leave it at 0 unless your preview looks too dark on your monitor.
- save_exr - flip it off if you only want
hdr_linearfor in-graph grading and don't need files on disk.
Install
Via ComfyUI Manager (search ComfyUI_Gear) or:
cd ComfyUI/custom_nodes
git clone https://github.com/oumad/ComfyUI_Gear
cd ComfyUI_Gear
pip install -r requirements.txt
Restart ComfyUI. That's it - the dependencies are just opencv-python, numpy, and Pillow. No model downloads, no PyAV, no giant wheels.
Where people get burned
The curve must match the LoRA. Decode LogC3 content with the LogC4 node and the EXR will look plausibly tonemapped but be numerically wrong - absolute luminance off by a real amount, and your downstream grade is lying to you. This is the pack's one genuinely dangerous trap, and the fix is boring: check the LoRA name and docs.
- LogC3 targets → this node (LumiVid V9 / V5b,
klein_step*, LTX-2 HDR IC-LoRA) - LogC4 targets → Gear · LogC4 Decode + Save EXR (V10 /
*_logc4_*family) - ACEScct targets → Gear · ACEScct Decode + Save EXR (
prodigy_rank128_*,*_acescct_r128)
One honest caveat: the writer is half-float, so you get ~14 bits effective after VAE decode. That's more than enough for grading and way past 8-bit PNG, but if you need full 32-bit float masters you'll want to re-export downstream.
Wire hdr_linear into Gear · Color Grade for the full grading panel, or just let the EXRs hit disk and open them in DaVinci Resolve. Either way, you've stopped lying to yourself about what your model generated.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| filename_prefix | STRING | gear_hdr/%year%%month%%day%_%hour%%minute%%second% | — |
| preview_ev | FLOAT | 0.0-8–8 | — |
| save_exr | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| hdr_linear | IMAGE | — |
| tonemapped_preview | IMAGE | — |
| exr_paths | STRING | — |