Inpainting
A guide to the Inpainting action for intelligently removing or replacing objects in images.
Inpainting is an AI-powered image editing technique that allows you to intelligently remove, replace, or repair parts of an image. You simply "paint over" an area you want to change, provide a text prompt describing the desired change, and the AI model will regenerate just that selected area.
Use this action to:
Remove unwanted objects or people from photos.
Repair old or damaged photographs by painting over cracks or blemishes.
Change specific details in an image, like the color of a car or the style of a shirt.
How It Works
The Inpainting action requires two key inputs: the original image and a "mask" image. The mask is a black-and-white image where the white areas correspond to the parts of the original image you want the AI to edit. The AI then uses the text prompt to generate new content that seamlessly blends into the masked area.
Before & After Example: Removing an Object
Configuration
Input Parameters
Image
File
The source image you want to edit.
Mask Image
File
A black-and-white image mask. The white areas indicate the region to be inpainted. You can generate this in a previous step or upload it.
Prompt
Text
A description of what you want to see in the edited area. To simply remove an object, use a neutral prompt like "a grassy lawn."
Strength
Number
A value from 0 to 1 that controls how much the AI should adhere to the original image vs. the prompt. Higher values give the AI more creative freedom.
Output Parameters
Output
File
The final, edited image.
Example: Removing a Distraction from a Photo
In the example above, we want to remove the red ball from the picture of the dog on the lawn.
Inputs:
Image: The original photo of the dog with the ball.
Mask Image: A mask where only the area of the red ball is painted white. (You can create this mask in an external editor or potentially with future AgenticFlow drawing tools).
Configure the Inpainting Action:
Image: Connect the original photo.
Mask Image: Connect the mask file.
Prompt:
A grassy lawn, photo-realistic
(This tells the AI what to fill the space with).Strength:
0.8
(Give the AI enough freedom to create realistic grass).
The AI will look at the area defined by the white mask and the surrounding pixels, then use the prompt to generate new content (in this case, more grass) that logically and seamlessly fills the space.
Last updated
Was this helpful?