 the depth via an integrated depth-estimation model.
Start by creating an instance of the StableDiffusionDepth2ImgPipeline:


	Copied
import torch
import requests
from PIL import Image

from diffusers import StableDiffusionDepth2ImgPipeline

pipe = StableDiffusionDepth2ImgPipeline.from_pretrained(
    "stabilityai/stable-diffusion-2-depth",
    torch_dtype=torch.float16,
).to("cuda")
Now pass your prompt to the pipeline. You can also pass a neg