Model reference · open weights

stable-diffusion-inpainting

Image stable-diffusion-v1-5 Text→image 1 build Open weights 155k dl/mo

stable-diffusion-inpainting is an open-weight image model from stable-diffusion-v1-5. stable-diffusion-inpainting (BF16) weighs 2.7 GB; the smallest configuration that runs it is RTX 3060 12 GB.

  • Stable Diffusion Inpainting is a latent text-to-image diffusion model designed to generate photo-realistic images and modify existing pictures using a mask.
  • The model was initialized with Stable-Diffusion-v-1-2 weights and trained at a resolution of 512x512, with the UNet architecture including five additional input channels for the encoded masked image and mask itself.
  • It supports English prompts and is distributed under the CreativeML OpenRAIL M license.

Summary of the stable-diffusion-v1-5/stable-diffusion-inpainting model card, 2026-10-01

What it is

Released bystable-diffusion-v1-5
Released2024-08-30
VRAM2.7 GB for the weights

What it runs on

Memory and cards for stable-diffusion-inpainting (BF16)

2.7 GBweights, file size
1.7 GBbiggest part
5.0 GBworking memory, one 1024² image
537 MBruntime overhead
CardOne imageMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What stable-diffusion-v1-5 says about stable-diffusion-inpainting

Read the model card

⚠️ This repository is a mirror of the now deprecated ruwnayml/stable-diffusion-inpainting, this repository or oganization are not affiliated in any way with RunwayML.

Modifications to the original model card are in red or green

Stable Diffusion Inpainting is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input, with the extra capability of inpainting the pictures by using a mask.

The Stable-Diffusion-Inpainting was initialized with the weights of the Stable-Diffusion-v-1-2. First 595k steps regular training, then 440k steps of inpainting training at resolution 512x512 on “laion-aesthetics v2 5+” and 10% dropping of the text-conditioning to improve classifier-free classifier-free guidance sampling. For inpainting, the UNet has 5 additional input channels (4 for the encoded masked-image and 1 for the mask itself) whose weights were zero-initialized after restoring the non-inpainting checkpoint. During training, we generate synthetic masks and in 25% mask everything.

:-------------------------:|:-------------------------:|

Examples:

You can use this both with the 🧨Diffusers library and RunwayML GitHub repository (now deprecated), Automatic1111.

Use with Diffusers

from diffusers import StableDiffusionInpaintPipeline

pipe = StableDiffusionInpaintPipeline.from_pretrained(
    "sd-legacy/stable-diffusion-inpainting",
    revision="fp16",
    torch_dtype=torch.float16,
)
prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
#image and mask_image should be PIL images.
#The mask structure is white for inpainting and black for keeping as is
image = pipe(prompt=prompt, image=image, mask_image=mask_image).images[0]
image.save("./yellow_cat_on_park_bench.png")

How it works: image | mask_image :-------------------------:|:-------------------------:|

promptOutput

Use with Original GitHub Repository or AUTOMATIC1111

  1. Download the weights sd-v1-5-inpainting.ckpt
  2. Follow instructions here (now deprecated).
  3. Use it with AUTOMATIC1111

Model Details

  • Developed by: Robin Rombach, Patrick Esser

  • Model type: Diffusion-based text-to-image generation model

  • Language(s): English

  • License: The CreativeML OpenRAIL M license is an Open RAIL M license, adapted from the work that BigScience and the RAIL Initiative are jointly carrying in the area of responsible AI licensing. See also the article about the BLOOM Open RAIL license on which our license is based.

  • Model Description: This is a model that can be used to generate and modify images based on text prompts. It is a Latent Diffusion Model that uses a fixed, pretrained text encoder (CLIP ViT-L/14) as suggested in the Imagen paper.

  • Resources for more information: GitHub Repository, Paper.

  • Cite as:

    @InProceedings{Rombach_2022_CVPR,
        author    = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn},
        title     = {High-Resolution Image Synthesis With Latent Diffusion Models},
        booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
        month     = {June},
        year      = {2022},
        pages     = {10684-10695}
    }
    

Uses

Direct Use

The model is intended for research purposes only. Possible research areas and tasks include

  • Safe deployment of models which have the potential to generate harmful content.
  • Probing and understanding the limitations and biases of generative models.
  • Generation of artworks and use in design and other artistic processes.
  • Applications in educational or creative tools.
  • Research on generative models.

Excluded uses are described below.

Misuse, Malicious Use, and Out-of-Scope Use

Note: This section is taken from the DALLE-MINI model card, but applies in the same way to Stable Diffusion v1.

The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes.

Out-of-Scope Use

The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.

Misuse and Malicious Use

Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:

  • Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc.
  • Intentionally promoting or pro

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Running it yourself

Run it on a rented GPU

Rent a machine by the hour. Runs as it is with diffusers, on the machine, in Python.

# on your rented machine: pip install diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-inpainting", torch_dtype=torch.bfloat16).to("cuda")
image = pipe(prompt="a red bicycle on a cobbled street").images[0]
image.save("/workspace/out.png")
Renting a GPU: connect, tunnels, Python
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms