Nodes/ComfyUI-TextureAlchemy/Clarity Enhancer
ComfyUI Node

Clarity Enhancer

That Lightroom 'Clarity' Pop, as a Node

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Clarity Enhancer
  • image
  • result
clarity0.50
radius30
protect_shadowstrue
protect_highlightstrue

There's a specific look that photographers call "clarity" - mid-tone contrast that makes a texture feel crisp and tactile without touching overall brightness or blowing out the highlights. Clarity Enhancer is that effect as a ComfyUI node. Crank it up on a flat albedo and the material suddenly has punch; nudge it negative and things go soft and dreamy. It's the "make it pop" filter that isn't just a contrast slider.

It's part of the Detail category in amtarr/ComfyUI-TextureAlchemy. Texture artists love it because it adds perceived detail to a material without adding actual geometry - and, crucially, without the halo artifacts that naive sharpening leaves behind.

How it works

Clarity is local contrast enhancement: instead of stretching the whole tonal range like global contrast, it boosts contrast around the mid-tones at a local scale, defined by radius. The implementation uses a high-pass-style split - the image's low-frequency base is separated from its detail, the detail is boosted, and the result is recombined. The two protection toggles are the part that makes it behave like Lightroom:

  • protect_shadows (default on) - keeps dark regions from crushing to black.
  • protect_highlights (default on) - keeps bright regions from blowing out.

That protection is the difference between "clarity" and "contrast on crack." Negative clarity values soften - effectively a "dehaze in reverse," which is surprisingly useful for a gentle dreamy look on stylized albedos.

The inputs that matter

  • image - input texture.
  • clarity (−1 to 2, default 0.5) - amount. 0 = no change; ~0.3–0.7 is the safe zone; negative = soften.
  • radius (5–100, default 30) - the scale of the detail being enhanced. Small radius = fine grain; large radius = broad structure. For a 1K texture, 30–50 is typical.
  • protect_shadows / protect_highlights - leave both on for photography.

Output is result, a single IMAGE.

Where it slots in

Best placement is right before the PBR extraction chain or as a final albedo polish. A texture that reads as flat and plastic gets its surface "grip" back with a clarity pass, which then carries through to the normal and roughness maps you derive from it. It's also great on AO and height maps - clarity on an AO map makes the occlusion read stronger without touching its overall range.

Installing it

Ships inside TextureAlchemy:

cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy

restart, and it's under Texture Alchemist → Detail. ComfyUI Manager: search "Texture Alchemy". No extra pip dependencies.

Gotchas

Clarity amplifies noise, just like any detail boost - run it after denoising, or your sensor grain becomes texture. And large radius values on small images can overshoot into halos around high-contrast edges, so if you see glowing outlines, that's radius too big for the resolution, not a bug. The protection toggles only guard shadows and highlights - the mid-tones are fair game, which is the point, but it means a very high clarity value will still do a number on smooth gradients like sky or fog in a texture.

CategoryTexture Alchemist/Detail

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
clarityFLOAT0.50-1–2Clarity amount (0=no change, negative=soften)
radiusFLOAT305–100Effect radius
protect_shadowsBOOLEANtrue
protect_highlightsBOOLEANtrue

Outputs (1)

NameTypeDescription
resultIMAGE