Lesson 03

03. Inpaint & Outpaint Refinement

Fix hands, extend canvas, and salvage almost-right generations with mask-based editing.

When to inpaint

Inpainting regenerates only masked regions while keeping the rest intact. Reach for it when the overall image is good but a local area fails:

  • Hands / faces / eyes
  • Small object swaps (logo, prop, clothing detail)
  • Background cleanup (remove clutter, fix seams)

Mask slightly beyond the problem edge so blends look natural.

Inpaint settings

Use moderate denoise (0.4–0.65) for fixes; lower values paste texture, higher values invent new content. Match lighting language in the prompt to the surrounding pixels (same soft window light, matching skin tone).

Outpaint basics

Outpaint extends the canvas beyond original borders. Keep overlap generous so the model sees context. Extend in one direction at a time for tall or wide scenes instead of jumping to extreme aspect ratios in a single step.

Workflow tips

  1. Save the base generation you like.
  2. Inpaint small regions iteratively rather than one huge mask.
  3. Outpaint in 256–512 px chunks, checking alignment each pass.
  4. Finish with light img2img at low strength if colors drift.

Practice

Take an almost-right portrait, inpaint one hand, then outpaint background width by ~20%. Compare before/after and note which prompt phrases kept skin tone consistent.