ADetailer: Automatic Face and Body Restoration
- Install ComfyUI Impact Pack and add the FaceDetailer node to an existing image generation workflow.
- Configure guide_size and denoise in FaceDetailer to fix distorted faces without changing facial identity.
- Position FaceDetailer correctly in the workflow — after the main generation and before the save or upscale step.
Why Faces Break in Complex Scenes
Diffusion models generate the entire image at once, not piece by piece. When you generate a full-body shot, a group scene, or an image where a face is small relative to the overall resolution, the model allocates proportionally less attention to each face. The result is inconsistent eyes, smeared teeth, asymmetric features, or outright distortion — even on a model that handles close-up portraits well.
The solution is a post-processing pass that detects face regions, crops and upscales them to a working resolution, inpaints them with the diffusion model at higher resolution, and composites the fixed result back into the original image. This is what ADetailer does in AUTOMATIC1111, and what the FaceDetailer node in ComfyUI's Impact Pack replicates — and often exceeds.
Installing Impact Pack
FaceDetailer is part of the ComfyUI Impact Pack custom node collection:
- Open ComfyUI-Manager → Install Custom Nodes
- Search for "Impact Pack" and install "ComfyUI-Impact-Pack"
- Restart ComfyUI
On first use, Impact Pack will automatically download the YOLO detection models it needs (face_yolov8m.pt and others). These are small files (a few MB each) that go in ComfyUI/models/bbox/. Let the first run complete — it may take a moment while downloading.
Optionally, download the SAM (Segment Anything Model) for better segmentation quality. SAM models go in ComfyUI/models/sams/. The mobile_sam.pt variant is the smallest and works well for most use cases.
The FaceDetailer Node
After installing Impact Pack, find the FaceDetailer node by double-clicking the canvas and searching "FaceDetailer." The node has many parameters, but these are the ones you actively tune:
- image: connects to your main workflow's final IMAGE output (after VAE Decode)
- model: connects to your Load Checkpoint MODEL (same as KSampler)
- clip: connects to your Load Checkpoint CLIP
- vae: connects to your Load Checkpoint VAE
- positive / negative: conditioning from your CLIP Text Encode nodes (same as main KSampler)
- bbox_detector: connect an UltraBBoxDetector node set to "face_yolov8m.pt" — this is what finds faces in the image
- guide_size: the resolution at which face inpainting runs; 512 is standard
- denoise: how much to change the detected face region; 0.4–0.5 typically
Wire the FaceDetailer IMAGE output to your Save Image or upscale step. The FaceDetailer passes unchanged images that have no detectable faces, so it is safe to include in any workflow without conditional logic.
Tuning FaceDetailer for Good Results
The two parameters that most affect output quality are guide_size and denoise:
- guide_size 512: good default; higher values (768) improve detail but increase processing time
- denoise 0.4–0.5: repairs most face problems without changing the person's identity or expression. Lower values (0.2–0.3) make only subtle corrections. Higher values (0.6+) can significantly alter the face — useful for severe distortion but may change the expression or make the face look inconsistent with the rest of the image.
The positive prompt feeds into the face inpainting pass. Include face-specific terms (detailed face, realistic eyes, sharp features) to guide the repair in the right direction.
If FaceDetailer misses faces (doesn't detect them), lower the bbox_threshold on the UltraBBoxDetector node from the default 0.5 to 0.3. This makes the detector more sensitive but may trigger on false positives like masks or rounded objects.
Extending to Hands and Other Problem Areas
Hands suffer from the same multi-instance problem as faces. Impact Pack includes a HandRefiner workflow and supports hand detection using the hand_yolov8s.pt model in a separate UltraBBoxDetector node. You can chain two FaceDetailer nodes — one with face_yolov8m.pt, one with hand_yolov8s.pt — to fix both faces and hands in a single workflow pass.
The workflow position matters: run both detailers after your main generation and before upscaling. Fixing faces at base resolution is fast; fixing them after a 4x upscale is much slower and produces less consistent results because the face is now very large relative to the detection and inpainting resolution.
- FaceDetailer from ComfyUI Impact Pack detects face regions using YOLO, crops and upscales them, reruns the diffusion model at guide_size resolution, then composites the fix back — all automatically in one node.
- Install Impact Pack via Manager and let it download the YOLO detection models on first run — face_yolov8m.pt downloads automatically to models/bbox/ when you first execute a workflow with FaceDetailer.
- Denoise 0.4–0.5 fixes most face problems without changing expression or identity — higher values correct severe distortion but risk altering the face substantially.
- Run FaceDetailer after main generation (VAE Decode) and before upscaling — fixing faces at base resolution is faster and more consistent than fixing them after a 4x enlargement.
- Hands can be fixed with a second FaceDetailer node using the hand_yolov8s.pt detector — chain face and hand detailers in sequence for complete automatic body restoration.