← all repositories
Bing-su/adetailer

Fix Stable Diffusion’s broken faces without drawing a single mask

It automates the tedious masking step by using object detection to find and repaint faces, hands, and figures in Stable Diffusion images.

4.8k stars Python Image · Video · Audio
adetailer
Not currently ranked — collecting fresh signals.
star history

What it does

ADetailer is an extension for the AUTOMATIC1111 web UI that runs a second, invisible pass after your initial generation. It feeds the finished image to a YOLO detection model—trained for faces, hands, or whole people—generates a mask around the detected objects, and then inpaints those regions with a fresh prompt. The result is a post-processing layer that tries to correct anatomical accidents without you ever opening a paint bucket tool.

The interesting bit

The extension treats object detection as a preprocessing stage for generative art. You can stack custom YOLO models, filter detections by confidence or relative size, and even merge or invert masks before the paint-over begins. It also speaks ControlNet, automatically selecting preprocessors for inpaint, openpose, depth, and other models so the repair pass respects the original pose and composition.

Key highlights

  • Ships with tuned YOLOv8 and MediaPipe models for faces, hands, and human figures; you can drop in your own .pt models.
  • Masks are adjustable via offset, erosion/dilation, and merge modes (None, Merge, Merge and Invert).
  • Hooks into ControlNet to constrain the inpainting stage with pose, depth, lineart, or tile guidance.
  • Supports per-detection prompts and negative prompts, falling back to the main generation prompt if left blank.
  • Exposes a REST API and special prompt tokens ([SEP], [SKIP], [PROMPT]) for scripted workflows.

Caveats

  • The README states it is developed and tested only on Stable Diffusion 1.5 inside the latest AUTOMATIC1111 web UI; other base models or interfaces are explicitly unsupported.
  • YOLO World model class selection and some advanced features rely on external wiki documentation rather than in-README explanation.

Verdict

Anyone batch-generating portraits or full-body images in A1111 and tired of manually fixing six-fingered hands should look here. If you use ComfyUI, InvokeAI, or SDXL as your primary pipeline, this extension is not built for you.

Frequently asked

What is Bing-su/adetailer?
It automates the tedious masking step by using object detection to find and repaint faces, hands, and figures in Stable Diffusion images.
Is adetailer open source?
Yes — Bing-su/adetailer is open source, released under the AGPL-3.0 license.
What language is adetailer written in?
Bing-su/adetailer is primarily written in Python.
How popular is adetailer?
Bing-su/adetailer has 4.8k stars on GitHub.
Where can I find adetailer?
Bing-su/adetailer is on GitHub at https://github.com/Bing-su/adetailer.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.