explaingit

bing-su/adetailer

4,740PythonAudience · designerComplexity · 2/5Setup · easy

TLDR

A plugin for Stable Diffusion that automatically detects and fixes blurry faces and hands in AI-generated images using object detection, without any manual masking.

Mindmap

mindmap
  root((ADetailer))
    What it does
      Auto-detects faces
      Auto-detects hands
      Inpaints problem areas
    Detection models
      Realistic face model
      Illustrated face model
      Hand model
      Custom YOLO models
    Controls
      Confidence threshold
      Mask dilation
      Separate prompt
      ControlNet integration
    Setup
      Extensions tab install
      No command line needed
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automatically fix distorted or blurry faces in AI-generated portraits without manual selection

USE CASE 2

Clean up hand details in AI-generated images using pre-trained YOLO detection models

USE CASE 3

Add a custom YOLO model to detect and inpaint any object type you choose

USE CASE 4

Combine with ControlNet to apply fine-grained style control to the inpainted region

Tech stack

PythonYOLOStable DiffusionAUTOMATIC1111

Getting it running

Difficulty · easy Time to first run · 5min

Installs directly from the AUTOMATIC1111 Extensions tab, restart the interface after install.

License not specified in the explanation.

In plain English

ADetailer is an extension for the AUTOMATIC1111 Stable Diffusion web interface, the popular browser-based tool people use to generate images with AI. The extension adds an automatic step that detects specific objects in a generated image and then re-draws (inpaints) those areas with extra attention, without requiring the user to do any manual masking. The main problem it solves is a common quality issue with AI image generation: faces, hands, and other detailed body parts often come out distorted or inconsistent, especially in images where they are small or appear off to the side. ADetailer runs detection on the finished image, finds those areas automatically, and runs an additional inpainting pass on just those regions to sharpen them up. The detection side uses YOLO models, which are object-detection models trained to find specific targets in an image. ADetailer ships with pre-trained models for faces (both realistic and illustrated styles), hands, and full person segments. You pick the model that matches what you want to fix, and the extension handles the rest. You can also add your own custom YOLO models by dropping them into a specific folder. The inpainting step can use the same prompts and settings as your original generation, or you can give ADetailer its own separate prompt to guide how the touched-up area should look. There are controls for confidence thresholds, mask size filters, mask adjustments like erosion and dilation, and integration with the ControlNet extension if you have that installed. Installation is done directly inside the Extensions tab of the Stable Diffusion web UI, either from the built-in extension browser or by pasting in the repository URL. No separate download or command-line steps are needed beyond restarting the interface after install.

Copy-paste prompts

Prompt 1
Set up ADetailer in AUTOMATIC1111 and walk me through fixing blurry faces in a generated portrait using the face detection model
Prompt 2
Help me add a custom YOLO model to ADetailer to detect and clean up a specific object type in my Stable Diffusion workflow
Prompt 3
Show me how to give ADetailer its own separate inpainting prompt so the face looks different from the rest of the image
Prompt 4
Explain how to tune ADetailer's confidence threshold and mask dilation settings to get sharper results on small off-center faces
Prompt 5
Help me set up ADetailer alongside ControlNet so the inpainted face follows a reference pose
Open on GitHub → Explain another repo

← bing-su on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.