Overview
Last updated
Last updated
Stable Diffusion is a text-to-image latent diffusion model created by the researchers and engineers from , and . Latent diffusion applies the diffusion process over a lower dimensional latent space to reduce memory and compute complexity. This specific type of diffusion model was proposed in by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Björn Ommer.
Stable Diffusion is trained on 512x512 images from a subset of the LAION-5B dataset. 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 can run on consumer GPUs.
For more details about how Stable Diffusion works and how it differs from the base latent diffusion model, take a look at the Stability AI and our own for more technical details.
You can find the original codebase for Stable Diffusion v1.0 at and Stable Diffusion v2.0 at as well as their original scripts for various tasks. Additional official checkpoints for the different Stable Diffusion versions and tasks can be found on the , , and Hub organizations. Explore these organizations to find the best checkpoint for your use-case!
The table below summarizes the available Stable Diffusion pipelines, their supported tasks, and an interactive demo:
text-to-image
image-to-image
inpainting
depth-to-image
image variation
filtered text-to-image
text-to-image, inpainting, depth-to-image, super-resolution
text-to-image, image-to-image
super-resolution
super-resolution
text-to-rgb, text-to-depth
To help you get the most out of the Stable Diffusion pipelines, here are a few tips for improving performance and usability. These tips are applicable to all Stable Diffusion pipelines.
Copied
To save memory and use the same components across multiple pipelines, use the .components
method to avoid loading weights into RAM more than once.
Copied
uses the by default, but 🌍 Diffusers provides many other schedulers (some of which are faster or output better quality) that are compatible. For example, if you want to use the instead of the default: