Gear · ACEScct Decode + Save EXR
ACEScct decode for the Prodigy r128 crowd — deep shadows finally get the code values they deserve
- image
- hdr_linear
- tonemapped_preview
- exr_paths
Third member of the Gear decode family, same skeleton, different curve. ACEScct (AMPAS S-2016-001) is an ACES log encoding - the "ct" stands for "with toe," meaning it has a linear shadow toe instead of a straight log floor. What that buys you: mid-gray at 0.18 linear lands at 0.4135 in code space, versus LogC4's 0.278, so far more of [0,1] is spent on shadows and midtones. Deep shadows get better precision, and lifting them in the grade behaves instead of banding or exploding into weird negatives.
Use it with the ACEScct Prodigy r128 family: prodigy_rank128_*, *_acescct_r128.
How it works
The curve in gear/acescct.py is a pure per-channel torch transfer function - deliberately without an AP1 primary matrix applied, the same convention as the LogC3/LogC4 curves in this pack. It maps linear ~0 → ~222.86 to [0,1] (ceiling ~10.3 stops above mid-gray, about a stop below LogC4), and because the toe is bounded rather than a hard floor, offsets in shadow still move smoothly. Output is a 16-bit half-float EXR, ~14-bit effective after VAE decode - plenty for grading.
Inputs and outputs
Same trio as its siblings, no surprises:
- image - the
[0,1]ACEScct output of your LoRA. - filename_prefix - ComfyUI tokens supported; defaults to
gear_hdr/YYYYMMDD_HHMMSSunderComfyUI/output/, auto-counter appended so files never collide. - preview_ev - exposure for the Reinhard thumbnail only. The EXR is unaffected.
- save_exr - turn off if you only want
hdr_linearin-graph.
Outputs: hdr_linear (scene-linear, up to ~222.86), tonemapped_preview, exr_paths (newline-joined absolute paths).
The gotcha
Same as the whole family: the decode curve has to match the LoRA's training targets. ACEScct, LogC3, and LogC4 all look similar on screen and produce very different linear values underneath. If your LoRA card says ACEScct, this is the node. If it says LogC4 or LogC3, use the matching sibling - a mismatched decode gives you a plausible-looking EXR with wrong absolute luminance, and you won't notice until you try to match it against real footage.
Install via ComfyUI Manager (search ComfyUI_Gear) or git clone https://github.com/oumad/ComfyUI_Gear into ComfyUI/custom_nodes, then pip install -r requirements.txt. Deps are just opencv-python, numpy, Pillow - no model files, no OCIO, no OCIO rig. See the LogC3 article for the full workflow.
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 | — |