Diffusers documentation

Diffusers

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started



Diffusers

Diffusers is a library of state-of-the-art pretrained diffusion models for generating videos, images, and audio.

The library revolves around the DiffusionPipeline, an API designed for:

  • easy inference with only a few lines of code
  • flexibility to mix-and-match pipeline components (models, schedulers)
  • loading and using adapters like LoRA

Diffusers also comes with optimizations - such as offloading and quantization - to ensure even the largest models are accessible on memory-constrained devices. If memory is not an issue, Diffusers supports torch.compile to boost inference speed.

Get started right away with a Diffusers model on the Hub today!

Learn

If you’re a beginner, we recommend starting with the Hugging Face Diffusion Models Course. You’ll learn the theory behind diffusion models, and learn how to use the Diffusers library to generate images, fine-tune your own models, and more.

< > Update on GitHub