This guide will introduce you to the inpainting workflow in ComfyUI, walk you through an inpainting example, and cover topics like using the mask editor
VAE Encoder (for Inpainting)
nodeComfyUI/models/checkpoints
folder:
Workflows
-> Open (ctrl+o)
.Load Checkpoint
loads 512-inpainting-ema.safetensors
Load Image
nodeQueue
or use Ctrl + Enter
to generateKSampler
for different generation resultsalpha
transparency channel (the area we want to edit),
so manual mask drawing isn’t necessary, you’ll often use the Mask Editor to create masks in practical applications.
Save Image
node and select Copy(Clipspace)
:
Paste(Clipspace)
:
Open in MaskEditor
:
Save
when finishedParameter Name | Function |
---|---|
pixels | Input image to be encoded into latent space. |
vae | VAE model used to encode the image from pixel space to latent space. |
mask | Image mask specifying which areas need modification. |
grow_mask_by | Pixel value to expand the original mask outward, ensuring a transition area around the mask to avoid hard edges between inpainted and original areas. |
Parameter Name | Function |
---|---|
latent | Image encoded into latent space by the VAE. |