BLOG

Chav - ADetailer Before and After

by GymDreams
Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav - ADetailer Before and After. Stable Diffusion txt2img with Airfuck’s Brute Mix.

There are a few technologies in Stable Diffusion that you should almost always use — ADetailer is one of them.

Chav, with ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav, with ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.

What is ADetailer?

ADetailer, short for After Detailer, is an extension for Automatic1111. You can install it from the Github URL. In short, it automatically inpaint faces and hands after you have generated the original render.

Why should you use it? Well, when you render at relative low-res e.g. 512x512, the facial features tend to be so small in the image that the AI engines often don’t have enough resolution during generation to accurately depict the kind of fine details required to show a face.

In the past, you would use old-tech e.g. face restoration to try to fix them, but the issue with using regular face restoration is that they might not render things in the same style as the rest of the image.

So that’s why ADetailer exists — by detecting the faces, then masking the image to inpaint just the faces automatically, you’re then applying the settings of your render directly on the image.

Comparison before and after ADetailer. chav. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Comparison before and after ADetailer. chav. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav 2, with ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav 2, with ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Comparison before and after ADetailer. Chav2. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Comparison before and after ADetailer. Chav2. Stable Diffusion txt2img with Airfuck’s Brute Mix.

Sometimes, as you see in this second example, you could argue that adding ADetailer removes some of the characteristics which made the render special. So that’s why there’s an option for the extension to always save the before version. I recommend enabling it so that when you get to post-processing, you can decide if you want to use the before or after version. For most renders, the after version will look better, but in some rare cases, you may prefer the before version. There are no right/wrong answers to which is better — often it’s a matter of personal taste.

Chav 2, without ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav 2, without ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav 1, without ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav 1, without ADetailer. Stable Diffusion txt2img with Airfuck’s Brute Mix.

As this tech depends on a face being detected, not all images rendered will have it applied. ADetailer will simply skip the version if it can’t detect any faces.

Chav, body only. Adetailer not applied. Stable Diffusion txt2img with Airfuck’s Brute Mix.
Chav, body only. Adetailer not applied. Stable Diffusion txt2img with Airfuck’s Brute Mix.

There are other more advanced parameters for ADetailer. I will write more about them in the future.

Background

If this guy looked different than most of my other men, that’s because it was originally Zakalwe404’s prompt. (IG: @zakalwe404) I worked on his prompt to try to debug some lighting issues he was having with another checkpoint model, but forgot to change my checkpoint to be the same that model. After changing to the other model, it didn’t solve the lighting issue. But I liked these images a lot so much I decided to use them for this ADetailer post.

Tech

  • Steps: 28
  • Sampler: DPM++ SDE Karras
  • CFG scale: 6
  • Seed: 1149763843
  • Size: 512x512
  • Model hash: 8ff8347bb0
  • Model: airfucksBruteMix_v10
  • VAE hash: 235745af8d
  • VAE: vae-ft-mse-840000-ema-pruned.vae.ckpt
  • Denoising strength: 0.4
  • Style Selector Enabled: True
  • Style Selector Randomize: False
  • Style Selector Style: base
  • ADetailer model: mediapipe_face_full
  • ADetailer prompt: "…"
  • ADetailer confidence: 0.25
  • ADetailer mask min ratio: 0.004
  • ADetailer dilate/erode: 4
  • ADetailer mask blur: 4
  • ADetailer denoising strength: 0.4
  • ADetailer inpaint only masked: True
  • ADetailer inpaint padding: 32
  • ADetailer restore face: True
  • ADetailer version: 23.7.11
  • Hires upscale: 1.5, 768x768
  • Hires steps: 25
  • Hires upscaler: 4x_NMKD-Siax_200k
  • Lora hashes:
    • add_detail: 7c6bad76eb54
    • epi_noiseoffset2: d1131f7207d6
  • TI hashes:
    • GS-Masculine: 80d035454481",
  • Automatic1111 Version: v1.6.0
  • Post Upscale: Topaz Gigapixel HQ 4x, 3072x3072
  • Post Processing: Adobe Lightroom