diffusers
State-of-the-art diffusion in PyTorch and JAX.
What it is and what it does
Diffusers is a modular library for working with state-of-the-art pretrained diffusion models. It provides three core components: ready-to-use inference pipelines that require only a few lines of code, interchangeable noise schedulers for controlling diffusion speed and quality, and pretrained model building blocks that can be combined to create custom end-to-end systems. The library emphasizes usability and customizability, making it accessible to both practitioners wanting quick inference and researchers building novel diffusion architectures.
The package depends on common ecosystem libraries (numpy, Pillow, requests, httpx, huggingface-hub, safetensors, regex, filelock, importlib_metadata) and integrates tightly with the Hugging Face Hub, where thousands of pretrained checkpoints are hosted. It supports generating images from text, image-to-image transformations, unconditional generation, and other modalities. The library is actively maintained, production-stable, and licensed permissively under Apache 2.0.
Use it for:
- Generate images from text prompts using pretrained models with minimal setup code.
- Build custom diffusion pipelines by combining pretrained models with different schedulers for specific quality or speed requirements.
- Train your own diffusion models on custom datasets using the library's training guides and modular components.
- Perform image-to-image transformations and guided generation tasks using conditional diffusion techniques.
- Integrate diffusion-based generation into production applications via the Hugging Face Hub infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Diffusers provides pretrained diffusion models and pipelines for generating images, audio, and 3D structures, along with interchangeable schedulers and model components for building custom diffusion systems.
Yes. Diffusers is production-stable, actively maintained, permissively licensed, and has low install friction. It offers both high-level pipelines for quick prototyping and low-level components for research. The main constraint is the Python 3.10.0 requirement and practical need for GPU hardware. Install it if you need to work with diffusion models.
Install
diffusers on PyPI
pip
pip install diffusersuv
uv add diffuserspoetry
poetry add diffusersInstalling diffusers
Before you install
Low friction install with a pure-Python wheel. Active maintenance with a recent release 42 days ago and strong community engagement (34314 stars). Requires Python 3.10 or later.
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for production applications.
Quickstart
pip install diffusers
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5")
pipeline("An image of a squirrel in Picasso style").images[0]
Requires Python 3.10.0 or later; practical inference typically requires a GPU, though CPU-only usage is possible.
Verify before relying
- Whether the package supports quantization or memory-optimization techniques beyond what the documentation excerpt shows.
- Performance characteristics and typical inference latency for different model sizes and hardware configurations.
- Support status for JAX backend mentioned in the summary but not detailed in the excerpt.
Package facts
| License | Apache 2.0 License (permissive) |
| Python support | supports the current Python release (>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — importlib_metadata, filelock, httpx, huggingface-hub, numpy, regex, requests, safetensors, Pillow |
| Maintenance | actively maintained — 42 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,094,836/month — #1,667 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: diffusers-0.39.0-py3-none-any.whl
Keywords: deep, learning, diffusion, jax, pytorch, stable, diffusion, audioldm
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
compelCompel lets you re-weight different parts of…
permissive · top 15,000 on PyPI
tomesdSpeeds up Stable Diffusion image generation by…
permissive · top 15,000 on PyPI
cache-ditCache-DiT accelerates inference for Diffusion…
unclear · top 15,000 on PyPI
k-diffusionk-diffusion is a PyTorch library implementing…
permissive · top 15,000 on PyPI
clip-interrogatorGenerates natural-language prompts from images…
permissive · top 15,000 on PyPI
f5-ttsF5-TTS generates natural-sounding speech from…
permissive · top 15,000 on PyPI
optimumOptimum provides optimization tools to export…
permissive · top 5,000 on PyPI
dynamicpromptsGenerates varied text prompts for image…
permissive · top 15,000 on PyPI
lycoris-loraImplements parameter-efficient fine-tuning…
permissive · top 15,000 on PyPI