Automatic face and hand fixing with ADetailer
ADetailer is the standard Stable Diffusion extension for cleaning up the two things diffusion models reliably get wrong: faces (especially at a distance) and hands. It detects the region with a YOLO model, then inpaints it automatically after the base generation. The trick is that faces, hands, and full bodies each need different denoising and mask settings — this tool gives you the right configuration for your target and model.
How it works
You choose the fix target and your model type. The tool selects the appropriate detection model, a confidence threshold, and the inpainting parameters: denoising strength, mask blur, mask dilation, and only-masked inpaint resolution. Faces get low denoising to stay on-model; hands get higher denoising because finger geometry must be rebuilt; full bodies use a segmentation model with generous dilation so the re-render blends into the scene.
Why denoising strength is the critical parameter
Denoising strength controls how much the inpainting model diverges from the original. At 0.1 it barely touches the region; at 1.0 it generates from scratch. The sweet spot differs by target:
- Faces: 0.3–0.4. Enough to sharpen eyes, fix asymmetry, and add skin detail without changing identity or expression. Push to 0.5 only for badly distorted faces, since above that the character’s look can shift noticeably.
- Hands: 0.5–0.65. Finger count and anatomy require genuine regeneration; lower values leave the wrong number of fingers in place. Combine with a hand-positive prompt (“five fingers, detailed hand, natural pose”).
- Full body: 0.4–0.5 with a person_yolov8n-seg detection model. The segmentation model is important here — it follows the body outline rather than a bounding box, so the inpaint boundary does not cut through adjacent objects.
Detection models and confidence thresholds
| Target | Detection model | Confidence threshold |
|---|---|---|
| Faces | face_yolov8n | 0.3–0.5 |
| Hands | hand_yolov8n | 0.3–0.4 |
| Full body | person_yolov8n-seg | 0.3 |
Lower confidence thresholds detect more regions but increase false positives (inpainting background objects that loosely match). Raise the threshold if ADetailer is firing on the wrong parts of the image.
Only-masked inpaint resolution
This setting controls the resolution of the crop passed to the inpainting model. The model “sees” a high-resolution close-up of the face or hand rather than the small region at original image scale. Set this to your model’s native resolution:
- SD 1.5: 512px
- SDXL: 1024px
Without this, inpainting a 100×80 pixel face at a 512 global resolution produces soft, low-detail output.
Tips for reliable fixes
- Low denoise for faces, higher for hands. Faces stay recognizable at 0.3–0.4; hands need 0.5+ to correct fingers.
- Inpaint at native res. Set only-masked size to 512 (SD 1.5) or 1024 (SDXL).
- Add a positive prompt in ADetailer. “Detailed eyes, sharp focus” for faces or “five fingers, natural hand” for hands steers the fix.
- Raise dilation to blend edges. If the fixed region has a visible seam, increase mask dilation so the inpaint feathers into the surroundings.