Nodes/WtlNodes/Highlight & Shadow
ComfyUI Node

Highlight & Shadow

Rescue blown highlights and crushed shadows without a global exposure shift

By Scorpiosis0·Created 10 months ago·Updated 2 months ago· 3
Highlight & Shadow
  • image
  • IMAGE
shadow_adjustment0
highlight_adjustment0
midpoint0.50
feather_radius50
apply_type

AI generations love clipping. A face in sunlight gets blown out, or a shadowed corner turns into a black hole, and cranking the exposure down fixes one region while wrecking another. Highlight & Shadow from WtlNodes is the node that fixes just the highlight region or just the shadow region, the way the shadow/highlight tool works in real photo editors - because it's built on the same idea: separate the image into tone ranges and adjust each independently.

It's one of the pack's color-science-heavy nodes, and it's the one I'd actually reach for on nearly every final pass. It sits in the WtlNodes color family and behaves like it: proper math, sensible defaults, and the pack's live-preview apply_type so you can scrub the sliders before committing.

How it works

The node computes a luminance value per pixel and builds two soft masks around your midpoint: pixels darker than the midpoint get pulled into a shadow mask, pixels brighter get pulled into a highlight mask. Then feather_radius gaussian-blurs those masks so the adjustments fall off smoothly instead of banding at the boundary. Finally it applies your shadow and highlight adjustments to their respective regions and composites - so a +40 on shadows lifts only the dark side of the image, and the sky doesn't move with it.

The inputs that matter

  • shadow_adjustment and highlight_adjustment - −100 to 100, default 0. Negative darkens, positive brightens. The two dials you'll actually touch. This is where the difference from a brightness multiplier shows: you can darken highlights to rescue a blown sky while lifting shadows to recover detail, in one pass.
  • midpoint - 0 to 1, default 0.5. Where the split between "shadow" and "highlight" falls. Lower it and more of the image counts as highlight (the range being adjusted shrinks); raise it and the shadow range grows. Start at 0.5 and only move it if one region is clearly hogging the adjustment.
  • feather_radius - 0 to 200, default 50. The width of the soft transition. Too low and you'll see a visible seam where the adjustment stops; too high and the effect bleeds across the whole image and stops being localized.
  • apply_type - the pack-wide live-preview switch. This node is why that system exists: none pauses the workflow and shows you the preview update live as you drag, then Apply or Skip per image.

When it saves you

After generation, before export. A portrait with a blown background, a landscape with a dead-shadow foreground, a product shot that lost its box edges to shadow. One Highlight & Shadow pass beats a global exposure nudge every time, because it leaves the parts that were already right alone. If you're chasing photorealism, this is the kind of correction that separates "AI-looking" from "finished" - modidex's photorealism notes hammer on the same point: it's the regional corrections, not the model, that sell the image.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Scorpiosis0/ComfyUI-WtlNodes.git

Restart ComfyUI, or install via ComfyUI Manager (search "WtlNodes"). No models, no heavy deps.

Gotchas

  • Feather too small = banding. The hard edge between adjusted and unadjusted pixels is the classic failure. When in doubt, feather more than you think you need.
  • Extreme adjustments clip. +100 on shadows on an already-bright image just pushes everything to white. This node separates tone ranges, it doesn't recover information that was never recorded - a truly blown-out region stays clipped.
  • apply_type = none pauses your workflow. If the graph stops and waits and you didn't mean it to, the dropdown is set to none; switch it to auto_apply for hands-off runs.
CategoryWtlNodes/image

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
shadow_adjustmentFLOAT0-100–100
highlight_adjustmentFLOAT0-100–100
midpointFLOAT0.500–1
feather_radiusFLOAT500–200
apply_typeCOMBO3 options: none, auto_apply, apply_all

Outputs (1)

NameTypeDescription
IMAGEIMAGE