talira

Diffusers

State-of-the-art diffusion models for image, video, and audio generation in PyTorch

open sourceApache-2.0self-hostablefree

Diffusers is Hugging Face's Python library for pretrained diffusion models. It gives ready-made pipelines that generate images, video and audio in a few lines of code, interchangeable noise schedulers that trade speed for quality, and model building blocks for assembling or training your own diffusion systems. Pipelines load any of the 30,000+ compatible checkpoints on the Hugging Face Hub with from_pretrained, and the docs cover memory and speed optimisation and training techniques.

Problems it solves

  • generate images from a text prompt in Python with an open model
  • run Stable Diffusion or FLUX locally from my own code instead of a web UI
  • swap the sampler to get faster image generation with fewer steps
  • fine-tune a diffusion model on my own images
  • image-to-image and inpainting pipelines I can call from a script
  • generate short videos from text with an open model in Python
  • load any diffusion checkpoint from Hugging Face with one line
  • cut GPU memory so a diffusion model fits on my card
  • build a custom diffusion pipeline from reusable components
  • train a diffusion model from scratch for my own domain

Features

  • pretrained pipelines for text-to-image, image-to-image, inpainting, video and audio
  • interchangeable noise schedulers
  • model building blocks (UNets, transformers, VAEs)
  • loads 30,000+ checkpoints from the Hugging Face Hub
  • Modular Diffusers for composing pipelines
  • memory and speed optimisation guides
  • training scripts and guides
  • Apple Silicon (MPS) support

Alternatives

The same job

These do what Diffusers does.

  1. Transformers Hugging Face's Python library of model definitions for text, vision, audio and multimodal models

Compare Diffusers with the top 3