ScriptsMar 29, 2026·2 min read

Diffusers — Universal Video & Image Generation Hub

Hugging Face's diffusion model library. Run CogVideoX, AnimateDiff, Stable Video Diffusion, and 50+ video/image models with a unified API. 33,200+ stars.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

pip install diffusers torch
import torch
from diffusers import CogVideoXPipeline
from diffusers.utils import export_to_video

pipe = CogVideoXPipeline.from_pretrained("THUDM/CogVideoX-2b", torch_dtype=torch.float16)
pipe.to("cuda")
video = pipe("A golden retriever playing in snow").frames[0]
export_to_video(video, "output.mp4")

Intro

Hugging Face Diffusers is the universal hub for running diffusion models — including 50+ video generation models (CogVideoX, AnimateDiff, Stable Video Diffusion, Wan Video, LTX-Video, and more) through a single unified API. Pre-trained models download automatically from Hugging Face Hub. 33,200+ GitHub stars.

Best for: AI researchers, developers building video generation features, anyone wanting to run state-of-the-art video models locally Works with: Python, PyTorch, NVIDIA GPUs (CUDA)

Part of the Video AI Toolkit collection.


Supported Video Models

Model Type Quality
CogVideoX Text-to-video High
AnimateDiff Image-to-video High
Stable Video Diffusion Image-to-video High
Wan Video Text-to-video High
LTX-Video Text+audio-to-video High
ModelScope Text-to-video Good

Image Generation Models

Also supports 100+ image models: Stable Diffusion, SDXL, Flux, Kandinsky, PixArt, and more.

FAQ

Q: What is Diffusers? A: Hugging Face's Python library for running diffusion models with a unified API. Supports 50+ video generation models and 100+ image models. 33,200+ stars.

Q: Is Diffusers free? A: Yes. Apache 2.0 licensed. Models are freely downloadable from Hugging Face Hub. Requires GPU for practical use.


🙏

Source & Thanks

Created by Hugging Face. Licensed under Apache 2.0. diffusers — ⭐ 33,200+ Docs: huggingface.co/docs/diffusers

Related Assets