Easy Stable Diffusion inpainting tutorial for beginners in 2023

Inpainting is a powerful tool which can change the way you generate images and the way you edit the images. the Stable diffusion allows inpainting in various UI’s such as automatic1111, vlad which is an extension of automatic1111, Invoke AI etc etc.

Inpainting is one thing where all the beginners struggle as they do not know the correct technique to inpaint. I have been exploring inpainting for the past 6 months and this tutorial is for those who do not know how to inpaint at all or may be you have been inpainting the wrong way.

If you still haven’t installed stable diffusion go to this article and follow the steps to install.

I have made a video on inpainting which will help you follow along and get you started on the journey of inpainting. General steps to inpaint:

Stable diffusion inpainting tutorial

Step 1: Import the image to inpaint tab

The first step is to import images into the inpaint tab. You will find inpaint tab under the img-to-img tab.

Step 2 optional: Load the stable diffusion inpainting model

You can either load the inpainting model or you can inpaint on the currently loaded model in your automatic1111. There are various stable diffusion inpainting models available like deliberate v2 inpainting, the raw stable diffusion inpainting model, or the dreamshaper inpaint model

Step 3 : Inpaint over the area you want to change

Inpaint over the area you want to change, suppose its a face you want to change or improve just inpaint over that area like shown below in the image

Step 4 – Settings

Generally, what i do is i set the width and height to 512×512 and denoising strength between 0.35 to 0.55. Experiment with the choice of samplers and choose the ones that gives you the result you want.

Inpainting settings.

Video tutorial for stable diffusion inpainting compiling all the steps

Conclusion

There are no right or wrong ways to inpaint but this guide might help you get started in the right direction. If want to inpaint a whole new person than you can set denoising strength to 0.75 to 0.9 and experiment. You will find new things everyday. I have written two articles on how to upscale images. You can go and read them here and the new upscaling technique with controlnet and ultimate sd upscale here.

Leave a Reply

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