Skip to content

Inpainting Tutorial ​

Fix specific areas of an image.

What is Inpainting ​

Inpainting allows you to regenerate specific parts of an image while keeping other areas unchanged.

Use Cases ​

  • Fix faces or hands
  • Add or remove objects
  • Change clothing or background
  • Remove watermarks or text

Workflow ​

Step 1: Load Image ​

Node: LoadImage
- Upload your image
- This will be the base for inpainting

Step 2: Create Mask ​

Use one of these methods:

Method A: Built-in Mask Editor ​

  1. In SaveImage node, click "Mask" tab
  2. Paint white areas to indicate what to change
  3. Black areas will be preserved

Method B: Use Pre-trained Mask ​

  1. Load image with alpha channel (RGBA)
  2. White areas = mask

Step 3: Connect Nodes ​

[LoadImage] → [VAEEncode] → [KSampler] → [VAEDecode] → [SaveImage]
                ↑
[CLIPTextEncode(positive)]
[CLIPTextEncode(negative)]

Step 4: Adjust Parameters ​

ParameterValueReason
Denoise0.6-0.9Lower = more faithful to original
Steps20-30Quality-speed balance
CFG7-10Standard setting

Step 5: Generate ​

Click "Queue Prompt"

Mask Editor Features ​

Brush Settings ​

SettingFunction
SizeBrush radius
HardnessEdge softness
FeatherBlur edges

Tools ​

ToolUse
BrushPaint mask
EraserRemove mask
FillFill large area
InvertFlip mask

Tips for Better Results ​

Mask Creation ​

  • Feather edges: Use 5-10 pixel feather for natural transitions
  • Cover enough area: Include surrounding context
  • Avoid hard edges: Blend with surrounding areas

Prompts ​

  • Describe what you want to see in the masked area
  • Keep same style as original image
  • Use lower denoise (0.5-0.7) for subtle changes

Common Issues ​

IssueSolution
Visible seamsIncrease feather on mask edges
Style mismatchUse consistent prompts
Color inconsistencyLower denoise value

Advanced: Regional Inpainting ​

For multiple areas:

1. Create separate masks for each region
2. Run inpainting sequentially
3. Or use multiple KSampler nodes

Next Steps ​