https://www.anaconda.com/products/distribution

Install with all the defaults (except for the tutorials once it’s done)

https://github.com/Stability-AI/stablediffusion

Download using Code > Download ZIP; extract to C:\stablediffusion-main

Start Anaconda prompt

cd c:\stablediffusion-main

Setup SD as v1

https://github.com/CompVis/stable-diffusion#requirements

conda env create -f environment.yaml

conda activate ldm


Update SD for v2

https://github.com/Stability-AI/stablediffusion#requirements

conda install pytorch==1.12.1 torchvision==0.13.1 -c pytorch

pip install transformers==4.19.2 diffusers invisible-watermark

pip install -e .

Download SD Depth files

https://github.com/Stability-AI/stablediffusion#image-modification-with-stable-diffusion

Download (maybe need to login) https://huggingface.co/stabilityai/stable-diffusion-2-depth/resolve/main/512-depth-ema.ckpt to c:\stablediffusion-main\models\stable-diffusion\512-depth-ema.ckpt

Download https://github.com/intel-isl/DPT/releases/download/1_0/dpt_hybrid-midas-501f0c75.pt to c:\stablediffusion-main\midas_models\dpt_hybrid-midas-501f0c75.pt

Get ready to run depth2img.py

pip install gradio

pip install timm

Run the script (one line)

python scripts\gradio\depth2img.py configs\stable-diffusion\v2-midas-inference.yaml models\stable-diffusion\512-depth-ema.ckpt

Open http://127.0.0.1:7860/ (from the output)

You can resize your images to 512 x 512 png here: https://www.birme.net/

Enjoy!