Nodes/ComfyUI Layer Style/LayerColor: Gamma
ComfyUI Node Runs on cloud

LayerColor: Gamma

Gamma

By chflame163·Created 3 years ago·Updated 8 days ago· 3,118
LayerColor: Gamma
  • image
  • image
â—„gamma1.00â–º

Gamma is the midtone dial, and it's the tool that fixes the problem exposure can't. When you brighten with exposure you lift everything, highlights included, and things clip. Gamma instead bends the tonal curve in the middle: it brightens or darkens the midtones while mostly leaving pure black and pure white where they are. That's why it's the right node for "the shadows are too dark but I don't want to blow out the bright parts" - the classic underlit-render rescue.

One control does the work:

  • gamma - runs 0.1 to 10, default 1.0 (which is a no-op). Values below 1 brighten the midtones; values above 1 darken them. Yes, that's backwards from what your gut expects, and it trips people up constantly - it follows the mathematical convention where the pixel values get raised to the power of gamma. So if the image is too dark, you go down toward 0.5–0.8, not up. Small moves matter; you rarely want to stray far from 1.0.

Feed it an image, get an image out.

The mechanism is a power-law curve applied to the pixel values. Because it's a curve pinned at the endpoints, the effect is strongest in the midtones and fades toward the extremes, which is exactly why it preserves your blacks and whites while remapping everything between them. That makes gamma the more surgical partner to the Exposure node: exposure moves the whole image, gamma reshapes the middle. In a grade you'll often use both - set overall brightness with exposure, then fine-tune where the midtones sit with gamma.

Where it fits: recovering shadow detail without clipping highlights, flattening or punching up contrast in the midrange, matching the tonal feel of two images. It's a subtle, finish-stage tool more than a dramatic one. If you want a bigger, more opinionated tonal move with contrast and saturation baked in, AutoAdjust covers more ground; gamma is the precise single-axis knob. Just remember the direction - down brightens, up darkens - and you'll get on with it fine.

Install is the pack standard. Easiest is ComfyUI Manager - search ComfyUI Layer Style (or "LayerStyle"), install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt from inside the folder with ComfyUI's Python, and restart. On a hosted ComfyUI it's generally already there.

The pack-wide thing to watch: Layer Style is notorious for import failures - install it, restart, and the whole node set shows up red or missing. It's almost never the specific node; it's a dependency clash. The pack pulls a heavy stack (transformers, onnxruntime, opencv), and one mismatched version - a stray transformers or tensorflow in the environment being the usual cause - takes the entire pack down on import. The fix: open the ComfyUI startup log, find the traceback (it names the package that actually broke), reinstall requirements against ComfyUI's own Python, and use Manager's Try Fix. If Gamma is missing, every LayerStyle node is missing too, and that shared import failure is the real thing to chase.

Category😺dzNodes/LayerColor

Inputs (2)

NameTypeDefaultDescription
imageIMAGE—
gammaFLOAT1.000.1–10—

Outputs (1)

NameTypeDescription
imageIMAGE—