Nodes/ComfyUI Impact Pack/DetailerDebug (SEGS)
ComfyUI Node Runs on cloud

DetailerDebug (SEGS)

The raw-wired detailer that shows its work

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
DetailerDebug (SEGS)
  • image
  • segs
  • model
  • clip
  • vae
  • positive
  • negative
  • detailer_hook
  • scheduler_func_opt
  • image
  • cropped
  • cropped_refined
  • cropped_refined_alpha
  • cnet_images
guide_size512
guide_size_fortrue
max_size1024
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise0.50
feather5
noise_masktrue
force_inpainttrue
wildcard
cycle1
inpaint_modelfalse
noise_mask_feather20
tiled_encodefalse
tiled_decodefalse

This shows up in the picker as DetailerDebug (SEGS), and it's the detect-crop-refine engine every Impact Pack detailer runs on, wired with individual model/clip/vae inputs instead of a BASIC_PIPE, and with the crop images exposed as outputs so you can actually see what happened at each stage. Per the pack's own description: it "enhances details by inpainting each region within the detected area bundle (SEGS) after enlarging them based on the guide size." When a detailed face comes out wrong and you can't tell whether the detector grabbed the wrong region or the sampler botched the fix, this is the variant that lets you look.

That crop-enlarge-resample-paste loop is Impact Pack's whole reason for existing - the same idea as A1111's ADetailer, applied through a node graph instead of a checkbox.

How it works

For each region in segs, the node scales the crop up toward guide_size, caps it at max_size, runs a sampling pass using your model/clip/vae/positive/negative, feathers the paste edge, and composites the result back onto image. Because it takes the components raw rather than through a pipe, it's the node you reach for when you're not routing a BASIC_PIPE through the rest of your graph - or when you want every input visible and independently swappable at this exact node, without unpacking a bundle first.

The inputs and outputs that matter

  • image, segs - the picture and the detected regions to refine. No segs, nothing to detail.
  • model, clip, vae, positive, negative - the checkpoint and conditioning for the refine pass, wired individually.
  • guide_size (default 512) / max_size (default 1024) - the crop is scaled toward guide_size before sampling, capped at max_size. This is where the added detail comes from; too small and the pass barely helps, too large and you burn VRAM and risk style drift.
  • denoise (default 0.5) - how far the region departs from its original content. 0.3–0.5 is the sane range for a clean-up rather than a replacement.
  • sampler_name / scheduler - the full standard set (44 samplers, 17 schedulers including the AYS/GITS/kl_optimal additions), same list as Impact Pack's other samplers.
  • seed, steps, cfg, cycle (default 1, refine passes per region), feather, noise_mask, force_inpaint, wildcard - standard detailer controls.

Optional: detailer_hook, inpaint_model, noise_mask_feather, scheduler_func_opt, tiled_encode/tiled_decode (for high-res crops on limited VRAM).

The debug payoff is in the outputs: alongside the composited image, you get cropped (what was cut out), cropped_refined (what the sampler produced), cropped_refined_alpha (the mask), and cnet_images (if you're running ControlNet on the SEGS) - all list outputs, one entry per region. Wire cropped and cropped_refined into Preview Image nodes to watch each region before and after.

How to install it

Ships with the Impact Pack. ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack
cd comfyui-impact-pack
pip install -r requirements.txt

then restart. You'll typically also want the Impact Subpack for UltralyticsDetectorProvider and its YOLO models, since that's been a separate install from the base pack since v8.0.

Common issues & troubleshooting

Faces come out scaley or with visible artifacting even after adjusting steps, CFG, and denoise. A pattern the community has independently converged on: this often traces back to using the same seed for the base generation and the detail pass, combined with a high crop context, which can over-burn the region during resampling. Try a different seed for the detail pass than the one that made the original image.

Grey or mismatched box around the fixed region. The classic VAE round-trip artifact. Raise feather and noise_mask_feather, and confirm the vae you're feeding actually matches the checkpoint.

A crowd turns into clones. Every detected region samples off the same base seed by default, so faces converge. Vary the seed or prompt per region if you're detailing multiple similar subjects in one frame.

Not sure whether you need the debug outputs at all. If you're not actively diagnosing a bad result, the plain (non-debug) Detailer (SEGS) does the same refining without the extra list outputs cluttering your graph. Reach for this variant specifically when you need to see the crops, not for routine use.

CategoryImpactPack/Detailer

Inputs (27)

NameTypeDefaultDescription
imageIMAGE
segsSEGS
modelMODELIf the `ImpactDummyInput` is connected to the model, the inference stage is skipped.
clipCLIP
vaeVAE
guide_sizeFLOAT51264–16384
guide_size_forBOOLEANtrue
max_sizeFLOAT102464–16384
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11
positiveCONDITIONING
negativeCONDITIONING
denoiseFLOAT0.500.0001–1
featherINT50–100
noise_maskBOOLEANtrue
force_inpaintBOOLEANtrue
wildcardSTRING
cycleINT11–10
detailer_hookoptDETAILER_HOOK
inpaint_modeloptBOOLEANfalse
noise_mask_featheroptINT200–100
scheduler_func_optoptSCHEDULER_FUNC
tiled_encodeoptBOOLEANfalse
tiled_decodeoptBOOLEANfalse

Outputs (5)

NameTypeDescription
imageIMAGE
croppedIMAGE
cropped_refinedIMAGE
cropped_refined_alphaIMAGE
cnet_imagesIMAGE