Detailer (SEGS)
The crop-resample-paste engine behind FaceDetailer
- image
- segs
- model
- clip
- vae
- positive
- negative
- detailer_hook
- scheduler_func_opt
- IMAGE
Detailer (SEGS) is the actual workhorse of the Impact Pack. FaceDetailer gets the fame, but under the hood FaceDetailer is a detector bolted onto this node. Once you have SEGS - a bundle of detected regions from a BBOX or SEGM detector - this is what crops each one, runs a fresh sampling pass at full resolution, and pastes it back onto the image. Detect somewhere else, refine here.
The reason to reach for this instead of the all-in-one FaceDetailer is control. FaceDetailer bundles detection and refinement into one box with two dozen inputs; splitting them means you can detect once and feed the same SEGS to different refiners, filter the detections before refining, or intersect a bbox with a SAM silhouette first. It's the composable half of the pack, and it's the piece that makes the "detect, crop, resample, paste" loop - the same idea as ADetailer in A1111 - into something you can rewire.
How it works
For each region in the incoming SEGS, the node crops that area (with padding), scales it up to around guide_size, runs a normal img2img sampling pass on just that crop using the model and prompt you give it, then composites the result back into the original frame under a feathered mask. A 64px eye gets a 512px generation budget and comes back sharp. Because it samples each region independently, you can push detail into faces and hands without touching the rest of the picture - the whole point of masked, only-the-region refinement.
The inputs and outputs that matter
This node takes the sampler's ingredients directly rather than through a pipe:
image,segs(required) - the picture and the detected regions to refine.model,clip,vae,positive,negative(required) - the checkpoint and conditioning for the refinement pass. Reuse your main generation's model and prompt as a starting point.guide_size(default 512) - the target size each crop is scaled to before resampling. This is where the extra detail comes from; roughly match it to your model's native resolution (512 for SD1.5, ~1024 for SDXL/Flux).denoise(default 0.5) - how far the region departs from the original pixels. The dial you tune most. 0.3–0.4 for a gentle cleanup that stays on-model; higher regenerates more and risks drifting the face's identity.feather(default 5) - softens the paste edge so the fix blends instead of showing a border.cycle(default 1) - how many refine passes to run per region. 2 gives a stronger effect; watch for over-cooking.wildcard- an optional prompt applied per detection, handy for steering all faces at once.
There's an optional inpaint_model toggle (flip it on only when your model is a dedicated inpainting checkpoint) and tiled_encode/tiled_decode for VRAM relief. The single output is IMAGE - your original with every detected region refined and composited back.
How to install it
Install the 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
python -m pip install -r requirements.txt # ComfyUI's python; python_embeded on portable
then restart. This node itself needs no extra models - but the detector that produces its SEGS input does, which in practice means the Impact Subpack for UltralyticsDetectorProvider. Linux: libgl1-mesa-glx and libglib2.0-0 for OpenCV.
Common issues & troubleshooting
The face changed instead of just sharpening. denoise is too high. Drop it to 0.3–0.4. High denoise turns a detail pass into a full regeneration, which is why over-detailed faces stop looking like the person.
A crowd came back as a room of clones. Every region samples from the same base seed, so a bunch of small faces converge into near-identical ones - a well-known failure of automated detailers. Vary the prompt via the wildcard input, or refine fewer faces per pass.
Visible seam or a grey box around the fix. Raise feather, and make sure the vae you fed matches the model - a mismatched VAE is the classic source of a colour-shifted patch. Bbox-shaped seams also ease up if you feed the SEGS through SAMDetector (combined) first so the mask follows the silhouette.
Nothing happens. Empty SEGS. The detector upstream found nothing - check its threshold and that its model matches your subject.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| segs | SEGS | — | |
| model | MODEL | If the `ImpactDummyInput` is connected to the model, the inference stage is skipped. | |
| clip | CLIP | — | |
| vae | VAE | — | |
| guide_size | FLOAT | 51264–16384 | — |
| guide_size_for | BOOLEAN | true | — |
| max_size | FLOAT | 102464–16384 | — |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.000–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| denoise | FLOAT | 0.500.0001–1 | — |
| feather | INT | 50–100 | — |
| noise_mask | BOOLEAN | true | — |
| force_inpaint | BOOLEAN | true | — |
| wildcard | STRING | — | |
| cycle | INT | 11–10 | — |
| detailer_hookopt | DETAILER_HOOK | — | |
| inpaint_modelopt | BOOLEAN | false | — |
| noise_mask_featheropt | INT | 200–100 | — |
| scheduler_func_optopt | SCHEDULER_FUNC | — | |
| tiled_encodeopt | BOOLEAN | false | — |
| tiled_decodeopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |