Donut Local Contrast (DEPRECATED)
The Clarity slider, as a ComfyUI node
- image
- image
The name is the whole recipe: Hi-Radius, Lo-Amount unsharp masking. DonutHiRaLoAm doesn't sharpen fine detail the way a normal sharpen node does - it's the "Clarity" slider from Lightroom/Camera Raw, blown out to full pixel dimensions. If your render comes out looking flat and soft, this is the cheap, deterministic fix that adds depth without inviting the diffusion model back in.
It's marked DEPRECATED, and here's the thing: that's not a bug or a dead end. The same pack's DonutImageAdjust node folds it in as the local_contrast operation, so the algorithm lives on - this standalone version is just hidden from the Add-Node menu to keep the pack uncluttered. If you already have a workflow using it, it keeps working; if you're building fresh, reach for DonutImageAdjust instead. The math is identical.
How it works
Like any unsharp mask, it blurs a copy of the image, subtracts it to isolate the low-frequency detail, and adds that difference back. The trick is in the ratio: a big radius with a small amount means you're boosting local contrast (light against dark at a neighborhood scale) rather than ringing edges. That's what gives the "pop" and depth - the photographic Clarity look.
The four inputs map straight onto that recipe:
- radius (default 20, range 1–200) - how big the "neighborhood" is. Bigger = broader contrast, closer to a tonal boost; don't be shy, 20–100 is the intended zone.
- amount (default 0.2) - how hard the detail gets added back. Keep it in the 0.1–0.3 range; the tooltip literally warns you to stay low "to avoid halos."
- protect_tones (default 0) - pulls shadows and highlights out of harm's way so the boost doesn't clip them.
- fast_blur (default on) - uses a separable blur that runs faster at "identical quality," per the author. Leave it on.
Output is a single image, ready to feed a VAE decoder chain, an upscaler, or another Donut image node.
Install
It ships with the whole DonutNodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git donutnodes
cd donutnodes
python -m pip install -r requirements.txt
Or search "DonutNodes" in ComfyUI Manager and let it handle the dependencies (opencv-headless, scipy, matplotlib - nothing exotic). Restart ComfyUI either way.
Where people get burned
Two failure modes, both from cranking the knobs past the intended range. Amount much above 0.3 starts drawing halos around every edge - that's the classic USM artifact, and it reads immediately as "oversharpened." And note this is contrast, not edge detail: if your complaint is soft eyes or fuzzy texture, you want a real sharpener, not this. As a rule: run it at 0.1–0.2 amount, glance at the result, nudge once. It's a one-pass deterministic op - no seed lottery, no model reload - so iterate freely.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| radius | FLOAT | 201–200 | Large radius for local contrast enhancement |
| amount | FLOAT | 0.200–1 | Keep low to avoid halos (0.1-0.3 typical) |
| protect_tones | FLOAT | 0.00–1 | Protect shadows/highlights from clipping |
| fast_blur | BOOLEAN | true | Use separable blur (faster, identical quality) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |