Nodes/ComfyUI-DonutNodes/Donut Gamma Correction (DEPRECATED)
ComfyUI Node

Donut Gamma Correction (DEPRECATED)

A gamma slider with a dither knob — and a nod to a Linux image viewer

By DonutsDelivery·Created about a year ago·Updated about 15 hours ago· 25
Donut Gamma Correction (DEPRECATED)
  • image
  • image
gamma0
dither0.0

DonutGammaCorrection is the manual, honest version of the pack's auto-exposure tooling: a gamma slider and a dither slider, nothing else. It applies a power curve - the exact same algorithm Gwenview, the KDE image viewer, uses - so you get a predictable, well-tested exposure adjustment without any auto-detection cleverness getting in the way.

The gamma input runs −100 to +100 (default 0, no change). Positive values brighten shadows, negative values darken them; the node translates your slider into an exponent with 3^(-gamma/100), then applies output = input^exponent. Because it's a power curve, it never moves the white point - that's the "proper exposure" behavior that separates gamma from the additive brightness you get from a plain offset.

The optional dither input (0 to 2.0) is the interesting one. Gamma stretches 8-bit precision, and stretched gradients band - you get ugly posterized rings in a smooth sky. Dithering adds a tiny amount of noise to break up the banding: 0 is off, 0.5 is subtle, 1.0 is one LSB worth of noise. For a gradient-heavy image that's getting a big gamma swing, dither at 0.5–1.0 is the difference between posterized and smooth, and it's a feature most gamma nodes don't bother to ship.

Why you'd use this over the auto node

DonutAutoGamma (same pack, same deprecation status) decides the exponent for you. This node makes you decide, which is exactly what you want when you've got a target look in mind: a specific moody-dark edit, a batch that needs the same correction applied consistently rather than per-image auto, or a workflow where you've measured the right gamma once and want it reproducible. Auto is for speed; this is for control.

The honest verdict

It's DEPRECATED - folded into DonutImageAdjust, which exposes gamma (alongside auto-gamma, white balance, and histogram stretch) in one multipurpose node. Old workflows still load it fine; new graphs should use DonutImageAdjust. Nothing about the algorithm changed.

The classic trap with any gamma node is scale confusion: this one's ±100 scale with a 3^(-gamma/100) exponent is aggressive in a good way - +30 is a visible lift, +100 is a dramatic one - but if you came from a node where gamma is 0.5–2.0 (the raw exponent), the numbers mean completely different things. Start at +10 and step by 5. And pair it with dithering on anything with smooth gradients; that's genuinely the feature that makes the node worth having.

Install: ships with the pack - ComfyUI Manager → search DonutNodes, or git clone into custom_nodes/ and pip install -r requirements.txt with the same Python that runs ComfyUI. Pure tensor math on the image; no model downloads, no GPU drama.

Categorydonut/image

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
gammaFLOAT0-100–100Gamma adjustment (-100 to +100). Positive brightens shadows, negative darkens them.
ditheroptFLOAT0.00–2Dither amount to reduce banding (0 = off, 0.5 = subtle, 1.0 = 1 LSB worth of noise)

Outputs (1)

NameTypeDescription
imageIMAGE