Diffusers
Hugging Face's Python library for running and training diffusion models for images, video and audio.
Diffusers is the Hugging Face library for pretrained diffusion models. It offers three core parts: ready-to-use pipelines that generate outputs in a few lines of code, interchangeable noise schedulers that trade speed against quality, and pretrained model components that you can combine into your own systems. The README says the Hub holds more than 30,000 checkpoints that work with Diffusers.
You install it with pip install diffusers[torch], load a model with DiffusionPipeline.from_pretrained and move it to a GPU. Apple Silicon is supported through PyTorch's MPS backend, and the documentation has a guide for it. Model cards for image and video models often show a Diffusers snippet, so it is a common way to reproduce a developer's own example.
The license is Apache 2.0. It is code for developers rather than a ready-made app, so for point-and-click use look at ComfyUI. The image and video models themselves are large, so check the memory needs on each model page.
Good for
- Building image or video generation features in Python
- Fine-tuning or LoRA training of diffusion models
- Reproducing the example from a model card
- Trying different schedulers to trade speed against quality
Watch out for
- It is a library, so you write the code or use another tool as the interface
- The models are large, and the memory needed is on each model page
- Check the model card for the Diffusers version it needs, since new models need recent library versions