AI Inpainting lets you paint a mask over any part of an image, then use a text prompt to describe what should replace that area. The result blends seamlessly into the surrounding image. Common applications include removing unwanted objects, replacing background sections, fixing damaged areas, or inserting new elements into an existing photo.
Image dimensions are auto-aligned before processing
Before the image enters the model, its dimensions are automatically adjusted to fall within 128–2048 pixels, each side rounded to a multiple of 64. Very small images (under 128px) get scaled up; images over 2048px get proportionally scaled down. The aspect ratio is preserved, and your painted mask scales with the image.
Writing prompts that actually work
Describe what should appear in the masked area — not what you want to remove. Examples:
- Remove a power line → "blue sky, continuous building silhouette, background extending naturally"
- Replace a T-shirt color → "dark navy cotton T-shirt, no print, natural lighting"
- Erase a watermark → "ground texture matching the surrounding area, smooth transition"
The closer the prompt matches the visual content around the mask, the more naturally the fill blends. For straightforward removal, a short background description ("grass," "white wall," "wood floor") is usually sufficient.
FLUX Fill vs. other models
FLUX Fill handles mask boundaries more delicately and produces more natural color and texture transitions — but it does not support the mask margin parameter, which is silently ignored when FLUX Fill is selected. Other SD-based models support mask margin (32–128 pixels), which expands the model's area of influence around the mask and helps edges blend into the surrounding image.
If the result has visible color blocks or hard edges around the repaired area: on non-FLUX models, try increasing the mask margin first. On FLUX Fill, try expanding the mask slightly to include a bit of the surrounding background.
Adjusting repair strength
The default strength of 0.85 works well for most inpainting tasks. For small localized repairs (removing a watermark, filling a small blemish), lowering to 0.6–0.75 keeps the result closer to the surrounding image style. For large-area replacements, increasing toward 0.9–1.0 gives the model more freedom to generate new content.