Nodes/SAX Bridge/SAX Enhanced Detailer
ComfyUI Node

SAX Enhanced Detailer

The detailer with shadow, edge, and noise knobs when the plain one isn't enough

By so16tm·Created 6 months ago·Updated 3 months ago· 0
SAX Enhanced Detailer
  • pipe
  • mask
  • PIPE_LINE
  • IMAGE
denoise0.45
denoise_decay0.00
cycle1
crop_factor3.0
noise_mask_feather5
blend_feather5
shadow_enhance0.00
edge_weight0.00
edge_blur_sigma1.0
latent_noise_intensity0.10
noise_type
context_blur_sigma0.0
context_blur_radius48
steps_override0
cfg_override0.0
guidance_modeoff
guidance_strength0.50
pag_strength0.00
positive_prompt

SAX Detailer is the everyday crop-refine-blend node. SAX Enhanced Detailer is the one you reach for when a redraw alone isn't enough - when the region comes back cleaner but still flat, still over-sharp, still not quite right. On top of the full basic detailer (crop, Differential Diffusion, cycles, guidance, PAG), it adds four families of enhancement: shadow enhancement, edge enhancement, latent noise injection, and a context blur that scrubs text artifacts out of the area around your mask. The README's flagship pipeline ends with this node, and it's the pack's quality ceiling.

What's new vs. the plain Detailer

Everything the basic node has - denoise, cycle, crop_factor, noise_mask_feather, blend_feather, mask, steps_override/cfg_override, guidance_mode/guidance_strength/pag_strength, positive_prompt - plus:

  • shadow_enhance (0–1) - darkens/strengthens shadow shading in the region, applied once to the cropped image before it's encoded. The fix for redraws that come back with flattened depth.
  • edge_weight (0–1) + edge_blur_sigma - an unsharp-mask edge enhancement, also applied once before encode. Wakes up soft lines and hair strands; edge_blur_sigma (default 1) sets how wide the "detail" the mask catches is.
  • latent_noise_intensity (0–2, default 0.1) + noise_type (gaussian/uniform) - injects noise into the latent each cycle to give the sampler texture to work with. The default 0.1 is subtle and safe; this is the knob for "the region is smooth but textureless."
  • denoise_decay (0–1) - the new star. It ramps the effective denoise (and latent noise) down across cycles, so the first pass rebuilds and later passes only refine. The formula: at cycle i, denoise * max(0, 1 - i * denoise_decay / cycle). With cycle=3, denoise=1.0, denoise_decay=0.9 you get [1.0, 0.7, 0.4] - a coarse rebuild that settles into gentle polish.
  • context_blur_sigma (0–64) + context_blur_radius (default 48) - blurs a ring of context just outside the mask boundary before encode, to suppress the text/artifacts that creep in where the crop meets the untouched image. radius controls the ring width in px; 0 blurs the whole context.

What to actually turn on

Don't turn everything on - that's the trap, and the results look like it. The sensible progression:

  1. Start with the plain Detailer settings and denoise_decay - a 2–3 cycle run with decay is the single best quality-per-cost upgrade here, and it's the thing to try first.
  2. If the region reads flat, add a little latent_noise_intensity (0.1–0.3). It's cheap and mostly safe.
  3. If lines are soft, nudge edge_weight up with a small sigma. If the region comes back too crunchy, you've gone too far.
  4. shadow_enhance and context_blur are situational - shadows for depth-hungry areas, context blur when you're seeing banding or text near the mask edge.

The mechanism, briefly

The image-domain preprocessing (shadow_enhance, edge_weight, context_blur) runs once on the crop before VAE encode - it's a pixel pass, not per-cycle. latent_noise_intensity is added fresh to the latent each cycle and decays in lockstep with denoise_decay, and the noise doesn't accumulate between cycles (each pass starts from the previous output plus a fresh noise term). VAE encode/decode still happens once total, same as the basic node. All the same guidance options are available because it shares the detailer core.

Where it goes

Same slot as the basic detailer - after upscaling in the README's 5-node pipeline, or right after the KSampler if you're not upscaling. Mask it from SAM 3 or a paint node, wire the pipe through, and you're done. Install:

cd ComfyUI/custom_nodes
git clone https://github.com/so16tm/SAX_Bridge

SAX/Bridge/Enhance → SAX Enhanced Detailer. Start with the defaults and one knob at a time; this node has range, and range means you can make things worse in interesting new ways.

CategorySAX/Bridge/Enhance

Inputs (21)

NameTypeDefaultDescription
pipePIPE_LINE
denoiseFLOAT0.450–1
denoise_decayFLOAT0.000–1
cycleINT11–10
crop_factorFLOAT3.01–10
noise_mask_featherINT50–100
blend_featherINT50–100
shadow_enhanceFLOAT0.000–1
edge_weightFLOAT0.000–1
edge_blur_sigmaFLOAT1.00.1–10
latent_noise_intensityFLOAT0.100–2
noise_typeCOMBO2 options: gaussian, uniform
context_blur_sigmaFLOAT0.00–64Blurs the context area near the mask boundary to suppress text artifacts. 0=disabled.
context_blur_radiusINT480–256Limits the blur target to a ring N px outside the mask boundary. 0=entire context.
maskoptMASK
steps_overrideoptINT00–2000 = inherit steps from loader_settings. Values ≥1 override it.
cfg_overrideoptFLOAT0.00–1000.0 = inherit CFG from loader_settings. Values > 0 override it.
guidance_modeoptCOMBOoffCFG guidance enhancement. agc=spike suppression, fdg=detail emphasis, agc+fdg=both, post_fdg=low CFG.
guidance_strengthoptFLOAT0.500–1Guidance effect intensity. 0.0=none, 1.0=maximum.
pag_strengthoptFLOAT0.000–1Perturbed Attention Guidance. Works at any CFG. 0.5=standard. Adds one extra forward pass per step.
positive_promptoptSTRING

Outputs (2)

NameTypeDescription
PIPE_LINEPIPE_LINE
IMAGEIMAGE