How to use Inpainting in Automatic1111 Part 2 : Large Area – Easy Case

Inpainting is a dynamic tool for modifying specific areas of an image, with its application varying depending on the realism of the new element you aim to add. For example, placing a sporty car in a barn is seen as quite plausible, enabling Stable Diffusion to effortlessly Inpaint a car into such a scene. In contrast, introducing an unlikely element, such as a panda in a living room, may be deemed less plausible by Stable Diffusion, thus necessitating additional steps. This article delves into the easier, more plausible scenario. How to use Inpainting in Automatic1111 Part 3 : Large Area – Difficult Case will explore the more challenging cases. Please note that this lesson expands upon the foundational understanding of the Inpainting UI covered in ‘How to use Inpainting in Automatic1111 Part 1: Small Area. If you have not yet familiarized yourself with these basics, we recommend reviewing that section first.

Let’s start with the simpler scenario. First, you’ll need an Inpainting model if you don’t have one already. An Inpainting model is, identifiable by the word “Inpaint” in its file name. If you don’t have one, it can be downloaded from a model-sharing website. For this demonstration, we will use the default Inpaint model from Stable Diffusion, sd-v1-5-inpainting.ckpt.

We will be placing a sporty car in a barn, so let’s generate the photo of a barn. Below is an example image.

The above image was generated using Stable Diffusion with the following parameters. You are more than welcome to save the above image and use it instead of generating one.

a photo of inside a barn in a farm,
highly detailed, photorealistic, uhd, raw photo, canon 5d mark iv, 24mm lens,
Negative prompt: drawing, 3d, bad quality, low quality
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 2536446095, Size: 768x512, Model hash: c95a4e4a92, Model: analogMadness_v60, Version: v1.7.0

Now send the image to Inpaint tab. On the Inpaint tab, load sd-v1-5-inpainting.ckpt.

Then change the positive prompt.

a photo of a sporty car parked inside a barn in a farm,
highly detailed, photorealistic, uhd, raw photo, canon 5d mark iv, 24mm lens,

Next mask the area to where you want to put a sporty car.

Adjust the Generation Parameters:

  • Masked Content: Choose fill
  • Inpaint Area: Select Whole picture
  • Width & Height: Maintain the resolution of the original source image without alteration.
  • Denoising strength: Set this to 1

Now click Generate. You should see a car is Inpainted in the generated image.

This marks the end of our tutorial on Inpainting for large areas in straightforward cases. If clicking Generate fails to produce an image of a car, please refer to How to use Inpainting in Automatic1111 Part 3 : Large Area – Difficult Case addresses more complex scenarios.

Leave a Comment

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