Use these 3 Methods Helpful Methods to Make Stable Diffusion Restore Faces

Artificial intelligence is becoming very popular nowadays. There is significant progress in the field of text to image technology . Images generated with AI are becoming increasingly realistic, and many applications use those images, from advertising to movies to video games. However, the problem with AI-generated images is that sometimes they can produce undesirable or unexpected results. For Example, the issue of faces being “messed up” or being distorted in images generated by a stable diffusion model.


Why are Faces Being Distorted on Stable Diffusion?

Stable diffusion is a model that is trained with a large dataset of images using a neural network to generate high-quality images. But, one of the limitations of this technique is that sometimes it produces “messed up” or distorted faces. The reason behind this is the neural network is not able to get the all details and variations in human faces, which causes unreal or distorted results.


How do Make Stable Diffusion Restore Faces?

Luckily, there are some ways to restore faces that have been “messed up” or distorted by stable diffusion. The most effective way to do this is by using the AUTOMATIC1111 stable-diffusion-webui. This is an open-source tool that is particularly designed to generate images with stable diffusion, and it offers multiple features and options for get the best possible results.


Restore Faces with AUTOMATIC1111 stable-diffusion-webui

Some features of the stable-diffusion-webui are:
• Inpainting:

You can fill missing or distorted parts of the image with this feature, such as eyes or mouth.

• Color correction

You can adjust the color of the image to get a more natural look using this feature.

• Image enhancement

You can sharpen the image and improve its overall quality.

• Face restoration

This feature allows you to improve faces in pictures using either CodeFormer or GFPGAN.

(You can find all of its features at this link.)


Stable Diffusion restore faces


For creating new images, you can just select the “Restore Faces” option in the menu:


Stable Diffusion restore faces


If you want to fix the eyes of an already existing image, just go to the “Extras” tab and upload your image.


Stable Diffusion restore faces


Set the impact (from 0 to 1) of CodeFormer or GFPGAN. You might need different configurations depending on the image.


Inpainting with AUTOMATIC1111 stable-diffusion-webui

Inpainting is a powerful feature of the AUTOMATIC1111 stable-diffusion-webui that lets you fill in distorted or missing parts of the image. This feature is specifically used for stable diffusion restore faces that have been “messed up” or distorted The inpainting feature lets you select the area of the image that you wish to fill in, and then this tool will automatically generate a new image that fills in the missing parts.

For this, go to the img2img tab and choose “inpaint”


Stable Diffusion restore faces


You select the eyes and the missing piece will be filled.


Stable Diffusion restore faces


The following configuration works well for me.


Stable Diffusion restore faces


How will Stable Diffusion Restore Faces without AUTOMATIC1111 WebUI?

To make stable diffusion restore faces without AUTOMATIC1111 stable-diffusion-webui, you can install the same tools CodeFormers and GFPGAN they used on your implementation.

Here you can find the huggingface/sczhou space doing stable diffusion restore faces using CodeFormers. And here is a tutorial by EdXD on explaining the use of GFPGAN.

Also Read: Here is How to Download and Install Stable Diffusion’s Anything V4.5 Model

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top