The ADetailer Workflow 01: Confidence Detection
In this first ADetailer workflow guide, you will learn how to use ADetailer to transform your images from monstrous to marvelous. You will start by generating a base image. Stable Diffusion can can create amazing visuals, but sometimes also creates abominations that look like Jabba the Hut with a supermodel’s body. Don’t worry, ADetailer can fix that. Then, you will use ADetailer to edit the image and make it look more realistic and appealing. You will also learn how to use different tools and settings in ADetailer to tweak and retouch your image to your liking. By the end of this series, you will be able to use ADetailer to carve out a perfect image.
What is the confidence threshold for Adetailer?
The confidence threshold for Adetailer is a setting that determines the minimum confidence score needed for the detection model to identify and segment different objects and people in your images. Lower values (e.g., 0.3) are advisable for detecting faces, while higher values (e.g., 0.9) are suitable for detecting more prominent objects. You can adjust the confidence threshold as necessary to improve or reduce the detections, depending on your desired output.
To follow along, you can download the model from the link below and use the same prompts and settings:
Prompts: cal70, Glamour photo, amateur photography, vintage photography, 1960s, beach, rio de janeiro, gorgeous blonde woman, (naked:1.1), (tanlines:1.1), beach towel on the sand, surrounded by the beachgoers, Dynamic Movement, Dancing or twirling with a flowing gown for a dynamic and energetic shot, relaxed atmosphere, subsurface scattering, (oily skin, glossy skin:1.2),film camera, grainy aesthetic
Negative: epiCPhoto-neg, cartoon, painting, illustration, (worst quality, low quality, normal quality:2), ng_deepnegative_v1_75t, not-best-physical-appearance-perfect::2, nude
The negative prompts are based on embeddings, which you can download by clicking on them.
Sampling Method: DPM++ 2 m Karras
CFG Scale: 7
Clip Skip: 2
ADetailer Workflow #1
Step 1: Generate the Image.
Step 2: Enable ADetailer
Step 3: Under ADetailer dropdown menu, select face_yolov8s.pt
How to Edit the Faces and Hands of Your Images with ADetailer
When you generate an image in Stable Diffusion, the details are often lost when the image is zoomed out. That’s why you need ADetailer to fix these mishaps. ADetailer works by detecting the model confidence, which is shown by the red boxes with numbers on the image. The higher the number, the more confident the model is about the detection.
For example, the woman in the white dress has a face detection confidence of 0.85 , which is higher than the others. These numbers are important for the next steps, but you can see that ADetailer already does a great job of fixing the faces of everyone in the image by default. Some people may be satisfied with that, but if you want more control, you can play around with the settings.
What if you only want to focus on the main subject’s face? You can do that by changing the Detection model confidence threshold to 0.085. This will only detect faces with a confidence of 0.85 or higher. But since we want to make everyone look good, we will keep the default value of 0.3 which means everything above 0.3 will be detected. This way, everyone’s faces will look normal and not melted.
Let's Fix those Hands of Yours Lady.
Now that we have fixed the faces, we can move on to the hands. You may notice that our subject’s hands don’t look very human. They look like they belong to Oswald Cobblepot, aka the Penguin. Don’t worry, ADetailer can fix that too.
To fix the hands, we need to use a different ADetailer model. We can do that by opening a second tab and selecting the hand_yolov8n.pt model . This model is specialized for hand detection and enhancement. We don’t need to change any settings for now, we just click generate and see what happens.
Generate without adjusting settings first.
Now we can see that the model has detected the hands of the people in the background, but also some false positives, like the woman’s head that looks like a hand. That’s because her head has some features that resemble knuckles.
To remove that detection, we can increase the detection confidence to 0.64. This will filter out the detections that have a lower confidence than 0.64, and keep the ones that have a higher confidence, like her other hand.
Increased dection confidence to 64, to avoid the head.
After doing that, we can see that the model has ignored the woman’s head, but there is still another issue. The model has detected the man on the left’s hands with a high confidence of 0.78. This means that the model will focus on his hands as well as the main subject’s hands. Unfortunately, we can’t remove his hands using ADetailer, because there is no way to specify which hands we want to edit. So we have to accept that and let the model generate his hands too.
For the final touch of this first workflow, I used Hires.Fix and the 4xUltrasharp Upscaler to make the image bigger by 2 times, with a Denoising strength of 0.03 to preserve the original quality. This also changed the appearance of the people in the background, but I didn’t like them anyway, so I used Photoshop’s generative fill to finish them off. LOL 😂
Used Photoshop Generative Fill to remove those ugly people.