-
Notifications
You must be signed in to change notification settings - Fork 18
Image Editor Backgrounds
As detailed in the Inpainting Backgrounds Wiki article, Inpaint can be used to give the subject a new setting. But there are also advantages to using the Image Editor for background replacement. For example, any image - including non-AI images - can be used for the background, and also, the subject can be easily placed in a different position within that background.
For this example, we are going to start with the same Miao image used in the Inpainting Backgrounds article, shown above.
To start the Image Editor, select the Features checkbox below the main canvas then open the Edit tab. Load the input window on the left with the source image. It will be automatically copied to the Output window. Next, open the Transparency & Composition accordion by clicking on it, as shown above.
The image above depicts the Transparency & Composition section. There are three tools associated with background removal: Remove Background, Background Masking Model and Use Alpha Matting.
Select the Remove Background checkbox to do the removal. If the result is not quite right, deselect Remove Background and try a different Background Masking Model. The default model is isnet-general-use but for this example I decided that I wanted the wall removed along with the rest of the background. The birefnet-general model, along with the Use Alpha Matting option, successfully removed the wall.
Once you are happy with the result, click Apply Transparency before continuing.
Open the "Overlay the Output Image onto a Base" sub-accordion and click in the "Load Base Image" window on the left to load the background image you will be using. In this case I used a generated image created with the prompt "tropical forest background".
Once the base image is loaded, the "Composite Image Output" window will display the background with the image we have been working on overlaid onto it.
If you wish to reposition the overlay the Horizontal Position and Vertical Position sliders can be used to do so. However, in this case the base image and the overlay are the same size. Deselect the Contain Overlay checkbox to allow the overlay to be moved.
I used the Horizontal Position slider to move the subject towards the right.
And lastly, Save Composite Image will place the result in today's Outputs folder. The Generate button is not used in this case because this is not a generative AI process.
The resulting image is displayed below.