This repo contains info, configs, and notes for running stable diffusion locally.
- GPU: Nvidia GeForce RTX3070 (Laptop) (8GB GDDR6 VRAM)
- RAM: 32GB DDR4
- OS: Win 11
- Python 3.10.0
- Model Checkpoint: v1-4
- Download weights 1
- Download any fork, I used the web-ui fork 2
- Change to
name: ldo
in environment.yaml - Rename weights
.ckpt
file tomodel.ckpt
and place in/models/ldm/stable-diffusion-v1
directory - Run
conda env create -f environment.yaml
in (base) miniconda3 - Activate env by
conda activate ldo
- Run
webui.cmd
in (ldo)
NOTE: The original repo 3 gave me a RuntimeError: CUDA Out Of Memory
even with --n_samples 1
. The optimized fork 4 has all the safety_checks removed and uses less VRAM and has a faster result generation time.
P.S. I didn't try the model.half()
tip that some people have suggested to use with the original repo for low VRAM usage.
Prompt#1: "a cat wearing a red hat"
Prompt#2: "a busy indian street market, artstation digital art"
Prompt#3: "a rat in a shiny medieval armour posing for a victorian era portrait, oil painting"
Prompt#4: "a steampunk flying machine flying in a beautiful blue sky, 4k"
I generated images in batches of 4 at a time.
Generation time ~ 40s (10s per image)
Peak memory usage: 7854 MiB / 8192 MiB / 95.871%
The steampunk one (Prompt#4) was an outlier, it took 330.05s total (82.51s per image).
Footnotes
-
WebUI with all optimizations pre-applied: https://github.com/sd-webui/stable-diffusion-webui ↩
-
Optimized: https://github.com/basujindal/stable-diffusion (Worked well enough) ↩