Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

abhishekarya1/stable-diffusion-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

Stable Diffusion Demo πŸ€– πŸ–ΌοΈ

This repo contains info, configs, and notes for running stable diffusion locally.

Enviroment

Hardware

  • GPU: Nvidia GeForce RTX3070 (Laptop) (8GB GDDR6 VRAM)
  • RAM: 32GB DDR4

Software

  • OS: Win 11
  • Python 3.10.0
  • Model Checkpoint: v1-4

Installation Steps

  1. Download weights 1
  2. Download any fork, I used the web-ui fork 2
  3. Change to name: ldo in environment.yaml
  4. Rename weights .ckpt file to model.ckpt and place in /models/ldm/stable-diffusion-v1 directory
  5. Run conda env create -f environment.yaml in (base) miniconda3
  6. Activate env by conda activate ldo
  7. 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.

Results (cherrypicked ofc!)

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"


Stats

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).

References

Footnotes

  1. https://huggingface.co/CompVis ↩

  2. WebUI with all optimizations pre-applied: https://github.com/sd-webui/stable-diffusion-webui ↩

  3. https://github.com/CompVis/stable-diffusion ↩

  4. Optimized: https://github.com/basujindal/stable-diffusion (Worked well enough) ↩

About

Tinkering around with stable diffusion v1.4

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /