readme: ---
  license: bigscience-bloom-rail-1.0
  ---
  tags:
  - stable-diffusion
  - text-to-image
  inference: false
  ---
  
  # Stable Diffusion v2 Model Card
  This model card focuses on the model associated with the Stable Diffusion v2 model, available [here](https://github.com/Stability-AI/stablediffusion).
  
  This `stable-diffusion-2` model is resumed from [stable-diffusion-2-base](https://huggingface.co/stabilityai/stable-diffusion-2-base) (`512-base-ema.ckpt`) and trained for 150k steps using a [v-objective](https://arxiv.org/abs/2202.00512) on the same dataset. Resumed for another 140k steps on `768x768` images.
  
  ![image](https://github.com/Stability-AI/stablediffusion/blob/main/assets/stable-samples/txt2img/768/merged-0005.png?raw=true)
  
  - Use it with the [`stablediffusion`](https://github.com/Stability-AI/stablediffusion) repository: download the `768-v-ema.ckpt` [here](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/768-v-ema.ckpt).
  - Use it with 🧨 [`diffusers`](https://huggingface.co/stabilityai/stable-diffusion-2#examples)
  
  ## Model Details
  - **Developed by:** Robin Rombach, Patrick Esser
  - **Model type:** Diffusion-based text-to-image generation model
  - **Language(s):** English
  - **License:** [CreativeML Open RAIL++-M License](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/LICENSE-MODEL)
  - **Model Description:** This is a model that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model](https://arxiv.org/abs/2112.10752) that uses a fixed, pretrained text encoder ([OpenCLIP-ViT/H](https://github.com/mlfoundations/open_clip)).
  - **Resources for more information:** [GitHub Repository](https://github.com/Stability-AI/).
  - **Cite as:**
  
        @InProceedings{Rombach_2022_CVPR,
            author    = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn},
            title     = {High-Resolution Image Synthesis With Latent Diffusion Models},
            booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
            month     = {June},
            year      = {2022},
            pages     = {10684-10695}
        }
  
  
  ## Examples
  
  Using the [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Stable Diffusion 2 in a simple and efficient manner.
  
  ```bash
  pip install --upgrade git+https://github.com/huggingface/diffusers.git transformers accelerate scipy
  ```
  Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to EulerDiscreteScheduler):
  *.7z filter=lfs diff=lfs merge=lfs -text
  *.arrow filter=lfs diff=lfs merge=lfs -text
  *.bin filter=lfs diff=lfs merge=lfs -text
  *.bz2 filter=lfs diff=lfs merge=lfs -text
  *.ftz filter=lfs diff=lfs merge=lfs -text
  *.gz filter=lfs diff=lfs merge=lfs -text
  *.h5 filter=lfs diff=lfs merge=lfs -text
  *.joblib filter=lfs diff=lfs merge=lfs -text
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
  *.mlmodel filter=lfs diff=lfs merge=lfs -text
  *.model filter=lfs diff=lfs merge=lfs -text
  *.msgpack filter=lfs diff=lfs merge=lfs -text
  *.npy filter=lfs diff=lfs merge=lfs -text
  *.npz filter=lfs diff=lfs merge=lfs -text
  *.onnx filter=lfs diff=lfs merge=lfs -text
  *.ot filter=lfs diff=lfs merge=lfs -text
  *.parquet filter=lfs diff=lfs merge=lfs -text
  *.pb filter=lfs diff=lfs merge=lfs -text
  *.pickle filter=lfs diff=lfs merge=lfs -text
  *.pkl filter=lfs diff=lfs merge=lfs -text
  *.pt filter=lfs diff=lfs merge=lfs -text
  *.pth filter=lfs diff=lfs merge=lfs -text
  *.rar filter=lfs diff=lfs merge=lfs -text
  *.safetensors filter=lfs diff=lfs merge=lfs -text
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
  *.tar.* filter=lfs diff=lfs merge=lfs -text
  *.tflite filter=lfs diff=lfs merge=lfs -text
  *.tgz filter=lfs diff=lfs merge=lfs -text
  *.wasm filter=lfs diff=lfs merge=lfs -text
  *.xz filter=lfs diff=lfs merge=lfs -text
  *.zip filter=lfs diff=lfs merge=lfs -text
  *.zst filter=lfs diff=lfs merge=lfs -text
  *tfevents* filter=lfs diff=lfs merge=lfs -text