73,575
stars
+2+6+92
10,675
forks
563
watchers
166
prs
744
issues
0
releases
0
discussions
README
Stable Diffusion Stable Diffusion was made possible thanks to a collaboration with Stability AI and Runway and builds upon our previous work: High-Resolution Image Synthesis with Latent Diffusion Models Robin Rombach\, Andreas Blattmann\, Dominik Lorenz\, Patrick Esser, Björn Ommer _CVPR '22 Oral | GitHub | arXiv | Project page_ !txt2img-stable2 Stable Diffusion is a latent text-to-image diffusion model. Thanks to a generous compute donation from Stability AI and support from LAION, we were able to train a Latent Diffusion Model on 512x512 images from a subset of the LAION-5B database. Similar to Google's Imagen, this model uses a frozen CLIP ViT-L/14 text encoder to condition the model on text prompts. With its 860M UNet and 123M text encoder, the model is relatively lightweight and runs on a GPU with at least 10GB VRAM. See this section below and the model card. Requirements A suitable conda environment named ldm can be created and activated with: conda env create -f environment.yaml conda activate ldm You can also update an existing latent diffusion environment by running conda install pytorch torchvision -c pytorch pip install transformers==4.19.2 diffusers invisible-watermark pip install -e . Stable Diffusion v1 Stable Diffusion v1 refers to a specific configuration of the model architecture that uses a downsampling-factor 8 autoencoder with an 860M UNet and CLIP ViT-L/14 text encoder for the diffusion model. The model was pretrained on 256x256 images and then finetuned on 512x512 images. Note: Stable Diffusion v1 is a general text-to-image diffusion model and therefore mirrors biases and (mis-)conceptions that are present in its training data. Details on the training procedure and data, as well as the intended use of the model can be found in the corresponding model card. The weights are available via the CompVis organization at Hugging Face under a license which contains specific use-based restrictions to prevent misuse and harm as informed by the model card, but otherwise remains permissive. While commercial use is permitted under the terms of the license, we do not recommend using the provided weights for services or products without additional safety mechanisms and considerations, since there are known limitations and biases of the weights, and research on safe and ethical deployment of general text-to-image models is an ongoing effort. The weights are research artifacts and should be treated as such. The CreativeML OpenRAIL M license is an Open RAIL M license, adapted from the work that BigScience and the RAIL Initiative are jointly carrying in the area of responsible AI licensing. See also the article about the BLOOM Open RAIL license on which our license is based. Weights We currently provide the following checkpoints: - sd-v1-1.ckpt: 237k steps at resolution 256x256 on laion2B-en. 194k steps at resolution 512x512 on laion-high-resolution (170M examples from LAION-5B with resolution = 1024x1024). - sd-
Top issues
#25Instructions for setup and running on Mac Silicon chips367 comments · 2022-08-16#283Perhaps use Rust instead of Python to avoid installation issues?145 comments · 2022-09-15#39CUDA out of memory83 comments · 2022-08-19#795Free Stable Diffusion API?49 comments · 2023-09-07#86help ! RuntimeError: CUDA out of memory. Tried to allocate 1.50 GiB (GPU 0; 10.92 GiB total capacity; 8.62 GiB already allocated; 1.39 GiB free; 8.81 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF44 comments · 2022-08-25#506"RuntimeError: Couldn't install gfpgan." When installing webui35 comments · 2022-11-25#48AMD GPU not supported? 33 comments · 2022-08-21#484Unable to Install Stable Diffusion29 comments · 2022-11-15