diffusers  by huggingface

PyTorch/Flax library for diffusion model research and applications

Created 3 years ago
30,792 stars

Top 1.2% on SourcePulse

GitHubView on GitHub
Project Summary

🤗 Diffusers is a PyTorch and Flax library for state-of-the-art diffusion models, enabling image, video, and audio generation. It targets researchers and developers seeking a modular toolbox for both inference and training, prioritizing usability, simplicity, and customizability.

How It Works

The library provides three core components: pre-trained diffusion pipelines for easy inference, interchangeable noise schedulers for controlling generation speed and quality, and modular pre-trained models that can be combined to build custom diffusion systems. This modular design allows users to leverage existing components or swap them out for custom implementations.

Quick Start & Requirements

  • Install with pip install --upgrade diffusers[torch] or pip install --upgrade diffusers[flax].
  • Requires PyTorch or Flax. GPU with CUDA is recommended for performance.
  • Official Quickstart: https://huggingface.co/docs/diffusers/quicktour

Highlighted Details

  • Supports over 30,000 checkpoints from the Hugging Face Hub.
  • Offers pipelines for various tasks including text-to-image, image-to-image, inpainting, and super-resolution.
  • Includes optimization guides for faster inference and reduced memory usage.
  • Active community with contributions and issue tracking for new models and schedulers.

Maintenance & Community

  • Actively maintained by Hugging Face.
  • Community contributions are encouraged via a dedicated contribution guide and issue labels.
  • Discord channel available for discussions and support.

Licensing & Compatibility

  • Licensed under Apache 2.0.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

While the library prioritizes usability, performance optimization (e.g., FP16, MPS for Apple Silicon) is available but may require specific configurations. The vast number of models and schedulers can present a learning curve for beginners.

Health Check
Last Commit

12 hours ago

Responsiveness

1 day

Pull Requests (30d)
123
Issues (30d)
46
Star History
481 stars in the last 30 days

Explore Similar Projects

Starred by Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), Rodrigo Nader Rodrigo Nader(Cofounder of Langflow), and
1 more.

DiffSynth-Studio by modelscope

0.9%
10k
Open-source project for diffusion model exploration
Created 1 year ago
Updated 13 hours ago
Feedback? Help us improve.