FaceDetailer (pipe)
The multipass face fixer that chains without re-wiring
- image
- detailer_pipe
- scheduler_func_opt
- image
- cropped_refined
- cropped_enhanced_alpha
- mask
- detailer_pipe
- cnet_images
FaceDetailer (pipe) is FaceDetailer for when one pass isn't enough. It does the same thing - detect faces, crop them, resample at proper resolution, paste them back - but instead of accepting a model, VAE, prompt, and detector as separate wires, it takes them all bundled into a single DETAILER_PIPE, and it outputs that same pipe again so the next FaceDetailer can pick up where this one left off. That output-is-also-an-input design is the entire reason the node exists.
The problem it solves is the 2-pass detail restore. A severely mangled face sometimes needs two goes: a first pass at modest settings to recover the rough shape, then a second at higher settings to put the detail back. You can wire two full FaceDetailers in a row, but each one needs the model, clip, vae, positive, negative, and detector re-connected - a mess of a dozen duplicate wires. The pipe collapses all of that into one cable. Chain three FaceDetailer (pipe) nodes and you've re-plugged one wire between them, not twelve.
How it works
A DETAILER_PIPE is a bundle: model, CLIP, VAE, positive and negative conditioning, the BBOX detector, an optional SAM model, and wildcard settings, all packed together. You build one with ToDetailerPipe (or BasicPipe -> DetailerPipe), feed it in here, and the node unpacks it to run the same detect-crop-refine loop FaceDetailer runs. Then it re-emits the pipe on its output so the next stage inherits the identical setup. Everything past the pipe is standard sampling - the same masked, full-resolution regional resample that underpins every detailer in the pack, and the same idea as ADetailer over in A1111.
The inputs and outputs that matter
image(required) - the picture to fix.detailer_pipe(required) - the bundle of model/clip/vae/conditioning/detector. Build it once withToDetailerPipeupstream.guide_size(default 512) - the size each detected face is scaled to before resampling. Where the detail comes from.denoise(default 0.5) - how hard the pass rewrites the face. The main dial. In a 2-pass setup, keep the first pass low (rough recovery) and let the second do the detail; 0.3–0.4 is the safe band for staying on-model.feather(default 5) - softens the paste edge.bbox_threshold(default 0.5),bbox_dilation,bbox_crop_factor- detection tuning: confidence cutoff, mask growth, and how much context each crop keeps.cycle(default 1) - refine passes per face within this node.
The sam_* inputs only do anything when the pipe carries a SAM model, in which case they steer how SAM tightens each mask to the silhouette. Outputs: image (the fixed frame), detailer_pipe (the same bundle, for the next stage - this is the one that makes chaining clean), plus mask (a visualization of what got detailed), cropped_refined and cropped_enhanced_alpha (per-face crops for inspection), and cnet_images.
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. The face detector inside the pipe comes from the Impact Subpack (UltralyticsDetectorProvider), which you install separately since v8.0. The bundled SAM model auto-downloads to ComfyUI/models/sams on first install. Linux: libgl1-mesa-glx and libglib2.0-0 for OpenCV.
Common issues & troubleshooting
Just starting out? Use plain FaceDetailer first. The pipe version earns its keep only when you're chaining passes. For a single face fix, the one-node FaceDetailer has fewer wires to get wrong; move to the pipe when you actually need 2-pass.
Both passes barely changed the face. If the face was already large and sharp, a detail pass mostly costs time and drifts the style - the most-upvoted reaction to a detailing demo was that the two versions looked identical. Detailers pay off on small faces; skip them on close-up portraits.
Second pass overcooked it. Lower the second stage's denoise. Stack two passes and their effect compounds - a 0.5 followed by another 0.5 is a lot of rewriting.
Nothing connects to detailer_pipe. You need to build the pipe upstream with ToDetailerPipe and give it a detector from the Subpack. Without a detector in the bundle, there's nothing to find faces with.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| detailer_pipe | DETAILER_PIPE | If the `ImpactDummyInput` is connected to the model in the detailer_pipe, the inference stage is skipped. | |
| 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 | |
| denoise | FLOAT | 0.500.0001–1 | — |
| feather | INT | 50–100 | — |
| noise_mask | BOOLEAN | true | — |
| force_inpaint | BOOLEAN | true | — |
| bbox_threshold | FLOAT | 0.500–1 | — |
| bbox_dilation | INT | 10-512–512 | — |
| bbox_crop_factor | FLOAT | 3.01–10 | — |
| sam_detection_hint | COMBO | 9 options: center-1, horizontal-2, vertical-2, rect-4, diamond-4, mask-area, +3 | |
| sam_dilation | INT | 0-512–512 | — |
| sam_threshold | FLOAT | 0.930–1 | — |
| sam_bbox_expansion | INT | 00–1000 | — |
| sam_mask_hint_threshold | FLOAT | 0.700–1 | — |
| sam_mask_hint_use_negative | COMBO | 3 options: False, Small, Outter | |
| drop_size | INT | 101–16384 | — |
| refiner_ratio | FLOAT | 0.200–1 | — |
| cycle | INT | 11–10 | — |
| inpaint_modelopt | BOOLEAN | false | — |
| noise_mask_featheropt | INT | 200–100 | — |
| scheduler_func_optopt | SCHEDULER_FUNC | — | |
| tiled_encodeopt | BOOLEAN | false | — |
| tiled_decodeopt | BOOLEAN | false | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| cropped_refined | IMAGE | — |
| cropped_enhanced_alpha | IMAGE | — |
| mask | MASK | — |
| detailer_pipe | DETAILER_PIPE | — |
| cnet_images | IMAGE | — |