Inpainting: How do I remove an element from an existing image?

Modified on Fri, 1 Nov at 12:43 PM

​​​​Inpainting is a powerful tool that allows you to seamlessly remove elements from an existing image. Instead of simply deleting or covering up pixels, inpainting works by “remixing” the existing pixels in the selected region to blend naturally with the surrounding areas. This approach allows you to make edits that look cohesive and realistic.


The inpainting process involves setting a region to edit, giving the model guidance on how the area should look, and setting a Denoising Strength to control how much the model changes the pixels. When removing an object, your goal is to create pixels that blend naturally with the surroundings, without adding new elements. This guide walks you through the steps for achieving that result.


Steps to Remove an Element Using Inpainting

Step 1: Load the Image on the Canvas


Open the Canvas

Start by navigating to the canvas where you’ll perform the removal.


Create a Raster Layer from the Image

        Drag your image from the gallery onto the canvas.

        Select New Raster Layer when prompted to place your image on a new layer.


Step 2: Define the Removal Area with an Inpaint Mask


Add an Inpaint Mask

        In the Layers tab, click Add Layer and select Inpaint Mask.

        Use the Brush Tool (or press the B hotkey) to outline the area where the object you want to remove is located. For straight or rectangular areas, you can use the Rectangle Tool.


Copy the Inpaint Mask to a Regional Guidance Layer

        Right-click on the inpaint mask layer.

        Select Copy Inpaint Mask and choose New Regional Guidance. Press + Prompt and provide a text prompt of the area without the object. For example, if you are trying to remove a person from a grassy field, just type: “Grassy field”. 


Step 3: Use the Color Picker for Initial Blending


Select Colors from the Surrounding Area

        Use the Color Picker Tool to sample colors from the area around the object you’re removing.

        Brush these colors into the inpaint mask area to give the model a starting point. You may completely cover the object that you are trying to remove with these colors. By matching the tones and textures in the surrounding image, this step helps the model blend the region more effectively.


Step 4: Adjust Denoising Strength for Desired Blending


Set an Appropriate Denoising Strength

        Denoising Strength determines how much the model changes the pixels in the selected area:

        high denoising strength (e.g., 0.8-0.9) applies significant changes to the pixels, ideal for removing large or complex elements and blending in new textures.

        lower denoising strength (e.g., 0.3-0.5) makes more subtle changes, suitable for small or simple object removals.


Step 5: Match the Prompt to the Surrounding Area


Provide a Clear, Matching Prompt

        For successful blending, it’s essential that your Global Positive Prompt describes what should appear in the selected area without introducing new elements. For example, if removing an object from a grassy field, a prompt like “green grass” or “grassy field” tells the model to fill the area with relevant textures rather than adding anything new.


Step 6: Invoke to Apply the Removal


Invoke

  • Press Invoke to let the model apply changes. It will use the prompts, colors, and denoising strength to remove the object and blend the region with the surrounding image.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article