Diffusers
Hugging Face's state-of-the-art library for diffusion-based image, video, and audio generation models.
Diffusers
Diffusers is the leading open-source library for running and fine-tuning diffusion models. It provides a modular, batteries-included API covering Stable Diffusion, FLUX, PixArt, Kandinsky, and dozens more — for text-to-image, image-to-image, inpainting, video generation, and audio synthesis.
Key Features
- Model zoo: 50,000+ pretrained checkpoints on the Hugging Face Hub, loadable in one line
- Pipelines: high-level
DiffusionPipelineAPI for immediate inference; mix-and-match schedulers (DDPM, DDIM, DPM-Solver, etc.) - Training scripts: LoRA, DreamBooth, textual inversion, full fine-tuning examples for all major architectures
- ControlNet & IP-Adapter: structural conditioning and reference-image style transfer built in
- Memory efficiency: FP16, BF16, 8-bit quantisation, sequential CPU offload, and
enable_xformers_memory_efficient_attention - Multi-modal: text-to-image, image-to-video, text-to-video, text-to-audio, depth-to-image, and more
Quick Start
pip install diffusers transformers accelerate
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained(
"black-forest-labs/FLUX.1-schnell",
torch_dtype=torch.bfloat16
).to("cuda")
image = pipe("A photorealistic cat astronaut on the moon").images[0]
image.save("output.png")
npx ai-supply add diffusers-image-generation
Curated mirror of the open-source Diffusers (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/diffusers-image-generation/check). Click a policy:
Consume Diffusers programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/diffusers-image-generation
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/diffusers-image-generation/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add diffusers-image-generation
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/diffusers-image-generation/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "diffusers-image-generation" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.