Color Exposure (MD)
Exposure in f-stops and a black level — the honest brightness node
- image
- mask
- image
If you've ever pushed the brightness slider and watched your highlights blow out while the shadows stay muddy, this is the node for you. mdColorExposure implements the GEGL exposure operator: exposure in f-stops (multiplicative, in linear terms) plus a black level offset. It's the "proper" brightness adjustment - the one that behaves like changing the exposure on a camera rather than like adding gray paint.
Why exposure beats brightness
This is the distinction our post-processing notes hammer on, and it's worth internalizing. A plain brightness slider adds a constant offset to every pixel - additive. Add 0.2 to everything and shadows rise, but so does black, which flattens contrast, and highlights slam into 1.0 and clip. Exposure is multiplicative: result = (image - black_level) * gain, where the gain is derived from 2^(-exposure). Raising exposure by a stop multiplies every pixel's linear value by ~2 - dark areas get pushed but the ratio between them is preserved, and there's no additive gray veil. It looks like turning up the light on the scene, not like raising the floor.
The math also means negative exposure is safe - underexposing compresses everything down toward black without the weird additive artifacts.
The controls
- Exposure - -10 to +10, in stops, 0 = unchanged. A full stop is a lot; 0.5 is a subtle lift; 1.0 is a clear brightening.
- Black_level - -0.1 to +0.1. Sets where "black" sits before the gain is applied. Negative pushes black up (foggy, lifted blacks - the film look); positive crushes it deeper. This is the knob that keeps a lifted exposure from turning into a wash.
- image in, image out, optional mask for per-region exposure - handy for darkening a sky without touching the subject.
Where it fits
This is the finishing-pass workhorse: pull exposure down on a too-bright render, add a touch of black level for a cinematic lift, all deterministic and instant. In a ComfyUI graph it sits right next to the other MdColorMod nodes after the VAE decode. It's also the one node in this pack where the underlying model is literally the GEGL math - a pure, no-guesswork port. Pair exposure with gamma for shadow control and you've covered most of "the image looks off" cases before you ever touch a diffusion setting.
Installing
Same as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/MdONeilsl/ComfyUI-MdColorMod
or ComfyUI Manager → "MdColorMod", restart. Empty requirements.txt, pure PyTorch, no model downloads, GPL-3.0. Young pack - if Manager hasn't indexed it yet, the manual clone is the reliable route.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image tensor. | |
| Black_level | FLOAT | 0.000-0.1–0.1 | Black level offset added to all channels. |
| Exposure | FLOAT | 0.00-10–10 | Exposure adjustment in stops (0 = unchanged). |
| maskopt | MASK | Optional mask to restrict the adjustment area. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The exposure-adjusted image. |