Fixing Faces in Stable Diffusion using ADetailer Extension

January 21, 2025

Learn how to enhance facial details in portraits using the After Detailer extension in Stable Diffusion. This guide covers installation, setup, and practical steps for flawless image results.

1. Introduction

Welcome to the ultimate guide for restoring and fixing faces with ADetailer Extension in stable diffusion. Explore the art of seamless facial enhancements as we unveil the power of this innovative tool. Whether you're a photography enthusiast, digital artist, or someone eager to master facial restoration, this guide navigates you through achieving pixel-perfect results. Join us in mastering the intersection of innovation and imagery, and elevate your skills in facial restoration.

2. Installing ADetailer Extension (A1111)

To make the most out of the ADetailer extension, you first need to install it within your Stable Diffusion environment. Follow these simple steps to get started:

  1. Navigate to the Extensions tab in Stable Diffusion.
  2. Click on the Install from URL subsection.
  3. Paste the official GitHub URL of the ADetailer extension https://github.com/Bing-su/adetailer.
  4. Click the Install button.
  5. After the installation is complete, proceed to the Installed section.
  6. Click on Apply and restart the user interface.

This process ensures that the ADetailer extension is successfully installed and ready for use.

3. When to use the ADetailer Extension?

Typically, when crafting full-body portraits or images where the subject is at a distance, you might observe faces becoming blurred or distorted. When facing this challenge, it's a strong indicator that the ADetailer extension could be your solution. This extension has the potential to restore faces when applied correctly. Below is an image created with "txt2img" where the face doesn't look natural and seems distorted.

Uploaded image- Positive Prompt: (full body portrait), (full body), woman, woman wearing red summer dress, red dress, latina woman, curly hair, cleavage, perfect light, perfect shadows, beach background, palm trees

  • Negative Prompt: (worst quality:1.2), (low quality:1.2), (lowres:1.1), (monochrome:1.1), (greyscale), multiple views, comic, sketch, (((bad anatomy))), (((deformed))), (((disfigured))), watermark, multiple_views, mutation hands, mutation fingers, extra fingers, missing fingers, watermark
  • Sampling Steps: 30
  • Sampler: DDIM
  • CFG scale: 7
  • Size: 512x800
  • Seed: 460251040
  • Model: Realistic Vision

When you see outcomes like those shown above, it's a suitable moment to activate the "ADetailer" extension. Next, we'll explore how to utilize the extension to correct the face.

4. How to use the ADetailer Extension (Settings Explained)

To begin the process of restoring the face, we must first enable the After Detailer Extension. This can be accomplished by checking the "Enable ADetailer" checkbox located at the top of the expansion panel.

ADetailer model

Next it is time to choose the appropriate detection model from the "ADetailer model" dropdown menu. The models are categorized into several groups:

  • Face: Detect and enhance faces (Works pretty well)
  • Hand: Detect and enhance hands (Does not work really well)
  • Person: Detect and enhance entire individuals (Works pretty well)
  • Mediapipe_face: Detect and enhance faces (Not recommended)

Prompts

In the prompt sections you have the option to fill in the positive and the negative prompt. Here, you should focus on the specific area you want to fix. For instance, in our example, we aim to repair a distorted face. Our prompt could look something like this: "detailed face, clear face, Latina woman's face.". You also have the option to use LoRA's inside the ADetailer prompt section, but for this example we choose not to use one.

Leaving a prompt empty results in the use of the main prompt. In our scenario, we didn't fill in the negative prompt within the ADetailer Extension, so it will rely on our main prompt.

My Settings Used

Below you can find the settings to restore the face of the woman:

Uploaded imageOnce you've activated the extension and selected the appropriate model, it's time to click the "Generate" button and observe whether it can successfully restore the face.

5. Restored Face Example (ADetailer Extension Enabled)

Once the generation process is complete, you can judge for yourself whether the face has improved or not. Here's an example of a restored face below:

Uploaded imageIn the enhanced image shown above, you'll notice a significant improvement in the quality of the face compared to its previous state. To offer a quick comparison:

Uploaded imageFor this comparison we used the same seed of the image

6. TIP: Upscaling Your Image for even Better Quality

Certainly, you can enhance your image further by upscaling it to include even more intricate details across the entire picture. Are you interested in discovering how to upscale an image using the capabilities of Stable Diffusion?

7. Conclusion

The ADetailer Extension within stable diffusion emerges as a transformative solution for restoring and fixing facial flaws. By automating processes and seamlessly enhancing features, this extension empowers users to achieve impeccable outcomes. From blurred faces to distorted features, ADetailer delivers efficient and effective restoration. This guide has showcased the extension's capabilities, from prompt customization to the use of YOLO models for accurate detection. Embrace automation and elevate your images to new heights with the ADetailer Extension in stable diffusion.

Frequently Asked Questions

AI Image Generation

Create Amazing AI Images

Generate stunning artwork with our powerful AI image generation tool

OR