Inpainting and outpainting#
Inpainting regenerates part of an image; outpainting extends it beyond its edges. Both happen on the canvas with an inpaint mask, the bounding box and the compositing settings. In the user tests this was the most reliable way to change a finished image; the Edit tab is faster for global changes.
Inpainting#
- Put the image on the canvas (Send To Canvas from the gallery or drop it in) and fit the bounding box to the part you work on. A box near the native size of the model gives the most detail; Scale before processing handles the rest.
- Add an inpaint mask layer and paint over the region to change. Mask Fill fills an enclosed area; Invert Mask keeps the painted part and regenerates everything else. An empty mask is an error, not a full repaint.
- Describe the whole scene inside the box in the prompt, not only the new part; the model sees the surroundings and needs to know what it is completing.
- Set Denoising strength: 0.4 to 0.6 alters within the existing shapes, 0.8 to 1.0 invents freely inside the mask. Pixels outside the mask never change.
- Generate, step through the staging area, Accept the best result.
Output Only Generated Regions keeps the result limited to the masked area when you send generations to the gallery instead of the canvas.
Outpainting#
Move or enlarge the bounding box past the edge of the existing pixels. The empty part is first filled by the infill method, then generated:
| Infill | Best for |
|---|---|
| Patch match | Photos and textures; continues patterns. Downscale trades quality for speed on large areas. |
| Tile | Repeating surfaces. |
| Colour | A flat fill in a colour you pick; good when the extension is sky or a plain wall. |
| LaMa | Learned inpainting; the most natural starting point for complex scenes. |
Keep the extension modest per pass (a third of the box or less) and repeat; one huge outpaint drifts. Describe the extended scene in the prompt.
Compositing#
Compositing blends the generated patch back into the picture:
- Mask blur and blur method: soften the seam. 8 to 16 px is a good start at 1024; box blur for hard-edged content, gaussian otherwise.
- Coherence pass: a second, lighter denoise over the seam region. Mode (gaussian blur, box blur or staged), edge size for how wide the seam band is, minimum denoise for how strong the pass is.
- Mask adjustments: grow or shrink the mask a few pixels before generating; growing hides hard edges, shrinking protects fine detail next to the mask.
- Color compensation (SDXL): corrects the colour shift image-to-image passes can introduce.
Recipes#
Fix a hand or a face. Small box around the part, mask it with a soft edge, denoising 0.5, the same prompt as the original plus the fix ("hand holding a cup, five fingers"); run 4 iterations and accept the best.
Replace a background. Mask the background, Invert Mask if it is easier to paint the subject, denoising 0.9 to 1.0, prompt the new setting and keep the subject description; add a global reference image for a specific look.
Extend a portrait to landscape. Widen the bounding box on one side by a third, LaMa infill, denoising 1.0 on the empty part (it is empty, so strength does not matter there), prompt the wider scene; then the other side.
Upscale a region. Fit the box to a detail, set scale before processing to manual at native size, denoising 0.3 with a tile control layer; accept, then move on to the next region. For whole images use the Upscaling tab.