Nodes/ComfyUI-Selective-Sigma-Detailer/Selective Sigma Detailer
ComfyUI Node

Selective Sigma Detailer

Sharpen the busy parts, leave the sky alone

By Capacap·Created 4 months ago·Updated 4 months ago· 1
Selective Sigma Detailer
  • sampler
  • sampler
strength0.100
coverage0.50

The pitch is in the name. Detail Daemon and its relatives make images sharper by telling the denoiser there's less noise left than there really is, which nudges the model to commit to higher-frequency structure. That works, until it doesn't: global sigma modulation sharpens everything, including the sky you wanted smooth and the bokeh you wanted soft. Clean backgrounds pick up grain, flat illustration color stops being flat. Selective Sigma Detailer is the fix for exactly that failure mode - same trick, but the strongest dose lands only where the model is already drawing detail, while smooth regions get an attenuated version instead of the full hit. The mask is a soft weighting, not a binary gate.

How it works

Mechanically it's a sampler wrapper in the family of Detail Daemon (the README credits Jonseed for the schedule gating and sigma-shift idea). It wraps an existing SAMPLER and hands you a new one to drop between KSamplerSelect and SamplerCustom. Per active step it runs two model forwards: one at a reduced sigma for the "detailed" prediction, one at the normal sigma for reference, blended by a mask built from |denoised_t - denoised_{t-1}| - regions where the prediction is still changing step-to-step are the busy ones. The delta is channel-averaged, percentile-clipped, min/max stretched into [0,1], and EMA-smoothed across steps so the mask doesn't flicker.

Why two forwards? Because sigma is a scalar from the denoiser's perspective - you can't pass a spatial sigma map in one call without retraining. Two calls blended by a mask is the only way to get region-selective behavior out of a stock model. The cost is real: roughly two forwards per active step, though the first 10% of the schedule (composition phase) is skipped and the last 10% stays clean. A 16-step SDXL run ends up paying for about twelve detail passes. The console prints a stats line explaining every call, e.g. [SSD] calls=16 detail=9 full=0 skip: schedule=6 activity=0 first=1 range=0 (7 forwards saved).

The two knobs that matter

  • strength (default 0.1) - peak per-step fraction of sigma removed on masked regions. 0.1 means "shave 10% off sigma at peak." Negative values soften instead of sharpen.
  • coverage (default 0.5) - shifts the mask threshold. 0 = empty mask (no effect), 0.5 = the raw delta mask, 1.0 = full mask applied everywhere, which skips the normal pass entirely and runs one forward per step - effectively Detail Daemon on the same schedule.

There are two sensible fast paths: strength = 0 or coverage = 0 returns your input sampler completely unwrapped, no overhead, and coverage = 1 collapses to the single-pass detailer. One output: a SAMPLER for SamplerCustom.

Where it fits

It's a sampler, so it slots into the custom sampling chain: sampler out of KSamplerSelect → this node → SamplerCustom. The repo ships two example workflows - a minimal txt2img (ssd_simple.json) and a hires-fix pattern (ssd_hiresfix.json) that does a base sample, latent upscale, then this as the second pass. The README's sweeps run on Juggernaut XL (photorealistic) and an Illustrious-family checkpoint (anime), which is the honest demo: it's architecture-level, not tuned to one style.

One gotcha worth knowing before you reach for it: on CFG++ samplers (_cfg_pp variants, the go-to for NoobAI v-prediction) the two-forward blend mangles the strength calibration, so the wrapper detects the CFG++ hook and attenuates strength by 0.15 to compensate. It's accurate at mid-mask and over-attenuates as the mask saturates - if you want full-strength detail on a CFG++ sampler, just use coverage = 1.

Install

Via ComfyUI Manager, search Selective Sigma Detailer and install - it's published on the Comfy Registry. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Capacap/ComfyUI-Selective-Sigma-Detailer

Restart ComfyUI. That's it - no model downloads, no extra pip dependencies beyond what ComfyUI ships (requirements.txt is empty), MIT licensed.

Troubleshooting

If you see no effect, check strength and coverage first - either at 0 silently returns the unwrapped sampler. Don't run it at very low step counts (say, under ~5): the schedule collapses to all-zero and the wrapper does nothing, which is correct behavior, not a bug. If it seems slow, that's the two-forward cost; the stats line tells you how many steps actually paid for a detail pass versus skipping. And if a workflow references Selective Sigma Detailer (Debug) or (Debug Preview) without the main node, they're the same pack - one install covers all three.

Categorysampling/custom_sampling/samplers

Inputs (3)

NameTypeDefaultDescription
samplerSAMPLER
strengthFLOAT0.100-1–1Peak per-step fraction of sigma removed on masked regions. 0.1 = -10% sigma at peak.
coverageFLOAT0.500–10 = empty mask (no effect), 0.5 = normal delta mask, 1.0 = full mask (applied everywhere, skips the normal pass).

Outputs (1)

NameTypeDescription
samplerSAMPLER