Inpaint — Mask & Regenerate inpaint
Load an image with a mask (paint the area to change in the Load Image node), encode it for inpainting, and KSample only the masked region. Good for fixing or replacing parts of an image.
Models: any SD1.5 inpainting checkpoint · 8 nodes
Workflow JSON
{
"1": {
"class_type": "LoadImage",
"inputs": {
"image": "your-image.png"
}
},
"3": {
"class_type": "KSampler",
"inputs": {
"seed": 0,
"steps": 20,
"cfg": 7,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": [
"4",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"12",
0
]
}
},
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "v1-5-pruned-emaonly.safetensors"
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"text": "a golden ankh, intricate detail",
"clip": [
"4",
1
]
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"text": "blurry, low quality",
"clip": [
"4",
1
]
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"3",
0
],
"vae": [
"4",
2
]
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "MELEK-inpaint",
"images": [
"8",
0
]
}
},
"12": {
"class_type": "VAEEncodeForInpaint",
"inputs": {
"pixels": [
"1",
0
],
"vae": [
"4",
2
],
"mask": [
"1",
1
],
"grow_mask_by": 6
}
}
}