Overview

Stable Diffusion pipelines

Stable Diffusion is a text-to-image latent diffusion model created by the researchers and engineers from CompVisarrow-up-right, Stability AIarrow-up-right and LAIONarrow-up-right. 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 High-Resolution Image Synthesis with Latent Diffusion Modelsarrow-up-right 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 announcementarrow-up-right and our own blog postarrow-up-right for more technical details.

You can find the original codebase for Stable Diffusion v1.0 at CompVis/stable-diffusionarrow-up-right and Stable Diffusion v2.0 at Stability-AI/stablediffusionarrow-up-right 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 CompVisarrow-up-right, Runwayarrow-up-right, and Stability AIarrow-up-right 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:

Tips

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.

Explore tradeoff between speed and quality

StableDiffusionPipelinearrow-up-right uses the PNDMSchedulerarrow-up-right 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 EulerDiscreteSchedulerarrow-up-right instead of the default:

Copied

Reuse pipeline components to save memory

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

Last updated