Nodes/ComfyUI-CustomNodePacks/Exposure Grade (MEC)
ComfyUI Node

Exposure Grade (MEC)

The Exposure Grade node from ComfyUI-CustomNodePacks

By Code2Collapse·Created 6 months ago·Updated a day ago· 52
Exposure Grade (MEC)
  • image
  • image
exposure_stops0.00
temperature0
tint0
contrast1.00
pivot0.180
operate_in_lineartrue

Exposure Grade (MEC) is the node you reach for when your generated frame is "almost right" and you want to fix it the way a colorist would, not the way a diffusion model would. It does three classic grade operations - exposure in stops, white-balance temperature/tint, and contrast around a mid-grey pivot - and it does them in one pass, cheap, deterministic, no re-roll. The name is a bit of a flex: it comes from the VFX suite of ComfyUI-CustomNodePacks, the ~72-node umbrella pack from Code2Collapse (the GitHub org of Likhith-24, who posts on r/comfyui).

The part that makes it worth opening over the stock brightness node: exposure is measured in stops, and the math happens in linear light. exposure_stops multiplies the image by 2**stops - so +1 doubles the light, -2 quarters it, exactly like a camera's exposure compensation. A stop is a stop whether you're in Nuke, DaVinci, or a 40-year-old light meter, and if you're handing AI output to a real compositor, working in stops keeps you speaking their language.

How it works

The node's default path (operate_in_linear = True) is the right one: it treats the input as sRGB-encoded, linearizes it, applies the math, then re-encodes back to sRGB. That's the difference between grading like a pro and grading on display-referred values where a contrast bump silently crushes highlights. Flip it off and the math runs directly on the encoded numbers - that's the legacy behavior, and it's the one thing beginners should leave alone.

Three knobs actually matter:

  • exposure_stops (−10 to +10, step 0.05) - the big one. Negative to rescue over-bright generations, positive to lift a dark plate.
  • temperature / tint (−100 to +100) - white balance. Push temperature warm or cool to undo that too-blue "AI twilight" cast; tint leans magenta/green.
  • contrast (0 to 4) around pivot (default 0.18, which is scene-linear mid-grey) - contrast is pivoted at 0.18 rather than mid-range 0.5, so it behaves like real film contrast instead of a dumb S-curve.

Output is a single image (IMAGE), so it slots anywhere - before a VAE encode, at the tail of an img2img pass, or ahead of a Save Image. For the color-managed VFX handoff the whole pack is aimed at, this sits nicely between a Color Space Convert (to linear) and a LUT apply.

Installing it

This ships inside ComfyUI-CustomNodePacks, not as a standalone repo. Easiest: ComfyUI Manager → search "CustomNodePacks" → Install. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git

Then install the pack's actual requirements - and not blindly via pip install -r requirements.txt, because the README warns that can overwrite ComfyUI's own torch/numpy. Check what's missing and install just that:

pip install opencv-python>=4.7.0 scipy>=1.10.0

Restart ComfyUI. This node itself needs nothing heavy - no model downloads, no VRAM - it's pure tensor math, so you get it working the moment the pack loads.

Common issues

  • Still looks washed out? That's usually operate_in_linear doing its job: a correct grade in linear light looks lighter on screen until you add contrast. Raise contrast around the 0.18 pivot rather than fighting exposure.
  • ModuleNotFoundError: cv2 at pack load - the pack needs opencv-python for a lot of its nodes; install it even though this one could technically run without it.
  • Over-correcting: exposure_stops at ±10 is a huge range and a stop too far crushes or blows instantly. 0.5 to 2 stops is the realistic band for fixing generations.

One honest caveat: if your "color's off" problem is really that one region doesn't match its surroundings, this node is the wrong tool - you want a color match to a reference, not a global grade. But for a whole-frame exposure and WB correction that survives a trip into a real grading app, this is the one you'd reach for.

CategoryMaskEditControl/Color

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
exposure_stopsFLOAT0.00-10–10Exposure adjustment in stops (linear multiply by 2**stops).
temperatureFLOAT0-100–100
tintFLOAT0-100–100
contrastFLOAT1.000–4Contrast multiplier around the mid-grey pivot.
pivotFLOAT0.1800.001–0.999Mid-grey pivot for contrast (0.18 = scene-linear grey).
operate_in_linearoptBOOLEANtrueIf True (recommended), input is treated as sRGB-encoded, linearized for the math, then re-encoded. If False, the math is done directly on the encoded values (legacy / display-referred).

Outputs (1)

NameTypeDescription
imageIMAGE