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

DetailerDebug (SEGS/pipe)

The detailer that shows its work

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
DetailerDebug (SEGS/pipe)
  • image
  • segs
  • basic_pipe
  • detailer_hook
  • refiner_basic_pipe_opt
  • scheduler_func_opt
  • image
  • segs
  • basic_pipe
  • 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
refiner_ratio0.20
cycle1
inpaint_modelfalse
noise_mask_feather20
tiled_encodefalse
tiled_decodefalse

This is the workhorse detailer with the lid off. In the UI it shows up as DetailerDebug (SEGS/pipe), and it does exactly what the regular Detailer (SEGS) does - crop each detected region, resample it at a proper resolution, paste it back - except it also spits out the intermediate crops so you can actually see what happened. When your faces are coming out weird and you can't tell whether the detector grabbed the wrong region or the sampler botched the fix, this is the node you swap in to find out.

That detect-crop-resample-paste loop is the entire reason Impact Pack exists. A face that occupies 80x80 pixels of a 1024px frame gets 80x80 worth of the model's attention and comes out mangled. The detailer gives that region its own full-resolution pass. It's the ComfyUI answer to A1111's ADetailer - more knobs, more setup, and (fair warning) more ways to shoot yourself in the foot.

How it works

You feed it an image and a segs (the detected regions, from a detector node). For each region it enlarges the crop toward guide_size, runs a sampling pass using the model and prompts bundled in your basic_pipe, feathers the edge, and composites it back onto the original. The "pipe" in the name means it takes a BASIC_PIPE (model + clip + vae + positive + negative in one wire) instead of five separate inputs - tidier once your graph gets busy.

The inputs and outputs that matter

  • segs - the regions to fix, from a detector (BBOX/SEGM/Simple Detector). No SEGS, nothing to detail.
  • basic_pipe - your model, VAE, and conditioning bundled together. This is where the actual generation settings live.
  • guide_size / max_size - the crop gets scaled up toward guide_size (default 512) before sampling and capped at max_size (default 1024). This is what buys back the detail; too small and the fix is pointless, too big and you waste VRAM and can drift the style.
  • denoise - defaults to 0.5. For faces, 0.3–0.5 is the sane band. Higher and you're not fixing the face, you're replacing it.
  • feather / noise_mask_feather - soften the paste edge so there's no visible box around the fix.
  • wildcard - an optional region-specific prompt (great for "detailed eyes" on a face pass).

The debug payoff is in the outputs. Alongside the finished image, segs, and basic_pipe (for chaining another pass), you get three list outputs: cropped (what it cut out), cropped_refined (what it made), and cropped_refined_alpha (the mask), plus cnet_images if you're running ControlNet on the SEGS. Wire cropped and cropped_refined into Preview Image nodes and you can watch each region before and after.

How to install it

Install the Impact Pack via ComfyUI Manager (search ComfyUI Impact Pack, Install, restart), or 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. To actually feed this node, you'll usually want the Impact Subpack too (for UltralyticsDetectorProvider and its YOLO face/hand models) - since Impact Pack v8.0 that's a separate install and no longer comes bundled.

Common issues & troubleshooting

Grey or mismatched box around the fixed region. Classic detailer artifact from the VAE round-trip. Raise feather and noise_mask_feather, and confirm your basic_pipe carries the correct VAE for the checkpoint.

The fix looks like a different person / style drifts. denoise is too high - drop to 0.3–0.4. Keep the prompt in the pipe consistent with the original generation.

A crowd turns into clones. Every detected region samples from the same seed, so faces converge. Vary the seed or prompt per region, or use the cropped outputs to spot it happening. Use the debug crops to check the detector actually found faces and not, say, patches of background - a wrong SEGS in means a wrong fix out.

CategoryImpactPack/Detailer

Inputs (25)

NameTypeDefaultDescription
imageIMAGE
segsSEGS
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
denoiseFLOAT0.500.0001–1
featherINT50–100
noise_maskBOOLEANtrue
force_inpaintBOOLEANtrue
basic_pipeBASIC_PIPEIf the `ImpactDummyInput` is connected to the model in the basic_pipe, the inference stage is skipped.
wildcardSTRING
refiner_ratioFLOAT0.200–1
cycleINT11–10
detailer_hookoptDETAILER_HOOK
refiner_basic_pipe_optoptBASIC_PIPE
inpaint_modeloptBOOLEANfalse
noise_mask_featheroptINT200–100
scheduler_func_optoptSCHEDULER_FUNC
tiled_encodeoptBOOLEANfalse
tiled_decodeoptBOOLEANfalse

Outputs (7)

NameTypeDescription
imageIMAGE
segsSEGS
basic_pipeBASIC_PIPE
croppedIMAGE
cropped_refinedIMAGE
cropped_refined_alphaIMAGE
cnet_imagesIMAGE