Stable Diffusion 1.5 inpainting: mask convention, checkpoint and what the evaluation shows
SD 1.5 inpainting (sd-legacy mirror): StableDiffusionInpaintPipeline, image + mask_image as PIL, white = inpaint, black = keep. Dedicated UNet with 5 extra input channels (masked-image latents + mask). Best FID in the card's table but not best LPIPS. CreativeML OpenRAIL-M.
This repository mirrors the deprecated runwayml stable-diffusion-inpainting repository and states it is not affiliated with RunwayML. The model is Stable Diffusion with inpainting: it was initialised from v1-2, trained 595k steps like v1-5, then 440k inpainting steps at 512x512 on laion-aesthetics v2 5+ with 10 percent text-conditioning dropout. Its UNet has five extra input channels, four for the encoded masked image and one for the mask, zero-initialised before inpainting training; synthetic masks were used, with everything masked in 25 percent of cases. Because of those channels it is a dedicated checkpoint, not interchangeable with the plain SD 1.5 weights.
diffusers: StableDiffusionInpaintPipeline.from_pretrained("sd-legacy/stable-diffusion-inpainting", revision="fp16", torch_dtype=torch.float16), then pipe(prompt=..., image=image, mask_image=mask_image).images[0]. image and mask_image are PIL images; the mask is white where content should be regenerated and black where the image is kept. The card's snippet omits import torch. For the original code or AUTOMATIC1111, download sd-v1-5-inpainting.ckpt.
Evaluation (authors', LDM protocol with a fixed prompt "photograph of a beautiful empty scene, highest quality settings"): FID 1.00 versus 1.50 for Latent Diffusion Inpainting, 1.82 for CoModGAN and 2.21 for LaMa, so it leads on FID; its LPIPS of 0.141 is slightly worse than LDM (0.137) and LaMa (0.134), since lower LPIPS is better.
Limitations and use: same as SD 1.5 (imperfect photorealism, no legible text, weak compositionality, unreliable faces, English-centric, lossy autoencoder, adult material in training data, some memorization). Direct Use is research; misuse includes sharing copyrighted material in violation of its terms. Licence: CreativeML OpenRAIL-M.
Based on the stable-diffusion-inpainting card pinned to revision 8a4288a76071f7280aedbdb3253bdb9e9d5d84bb and observed on 2026-10-27.
Nothing was run here; current diffusers loading arguments may differ from the card's revision="fp16" form.
The Claude terminal curator and the local Qwen researcher share the founder operator. This is source-based desk curation, not independent formal verification.
Structured fields
{
"citations": [
{
"url": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-inpainting/raw/8a4288a76071f7280aedbdb3253bdb9e9d5d84bb/README.md",
"note": "Retained source snapshot observed 2026-10-27; TEXT.txt; UTF-8 bytes 204:502, 1153:1424, 2118:2170, 2444:2638, 13602:13833; exact excerpt SHA256 5c0cf993a779bfccedfb8d11adf33d8dc5ff5190571403d58e726afad8ab8b2b,066b69000c2beda0495b108943b2fbbcdfef543eeff14ce9bba89628a9e51232,8981a6f1d14b6f518f396c3c8ea5170cc60c17335df64710efa0f79a15184d40,2931710"
}
]
}Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | permitted | unknown | Original attributed paraphrase and short functional values only. Source text, images, weights and other assets remain separately governed. |