Inpainting: Area replacement Inpainting

Replace one part of a picture and leave the rest as it was, using a mask.

6 stepsBring a picture of your own

The same tutorial, three subjects

Step by step

Explanation detail
  1. Model & style

    1 · Model and dimensions

    Use Deliberate Inpainting at 512×512. The tutorial sets both together.A dedicated inpainting model is trained to use masked images and surrounding context. Model and worker support determine what is available.This studio sends denoising strength 1 and hides the slider in Inpainting. For adjustable preservation of masked content, use masked img2img.Set to 1. The “Set this for me” button selects Deliberate Inpainting and sets CLIP skip to 1. Models can need different CLIP skip settings; using the wrong one can give poor results.
  2. Source image

    2 · Source mode

    Choose Inpainting under Source mode. A brush appears on the preview.Paint the area you want replaced. The studio sends the image and mask together.
  3. Source image

    3 · Source image

    Inpainting replaces a selected area of an existing image.Open , choose a Source mode to show the upload control, and attach your image. The tutorial cannot attach a file for you.The example uses an image at 512×512 pixels. Match those dimensions for a similar comparison.
  4. Source image

    4 · Mask

    Paint the area you want replaced. Brush size controls stroke width; the eraser removes parts of the mask.The mask is sent as a black-and-white image: white marks regeneration and black marks preservation. Include room around the replacement for blending.Paint your own mask and inspect its boundary after generation, especially if resizing or post-processing is enabled.
  5. Prompt

    5 · Replacement prompt

    Describe what should appear in the masked area. Include relevant context, such as lighting or nearby objects, to help it fit the scene.Prompt:
    (a colossal steampunk zeppelin airship:1.4) seen from below, filling the sky, red and gold painted hull, brass gondola with rows of glowing round windows, spinning propellers, mooring ropes, dramatically close overhead
    Negative prompt:
    lowres, blurry, watermark, text, empty sky, plain sky, clouds only, ocean, sea, water surface, sailing ship, boat, cruise ship
    The example uses to give one phrase more weight. If the replacement does not appear, revise the wording or the mask before raising the weight further.
  6. 6 · Generation

    Press Generate. Inspect the replacement and mask boundary when the result arrives.If you see a seam, try adjusting the mask or prompt. Waiting time depends on compatible workers and the queue. This run took about 9 seconds.

Related tutorial

Try ControlNet to guide a new image using features from an existing one, such as outlines or a pose.