 of the StableDiffusionInpaintPipeline:


	Copied
import PIL
import requests
import torch
from io import BytesIO

from diffusers import StableDiffusionInpaintPipeline

pipeline = StableDiffusionInpaintPipeline.from_pretrained(
    "runwayml/stable-diffusion-inpainting",
    torch_dtype=torch.float16,
)
pipeline = pipeline.to("cuda")
Download an image and a mask of a dog which you’ll eventually replace:


	Copied
def download_image(url):
    res