🎓 All Courses | 📚 Hugging Face University Syllabus
Stickipedia University
📋 Study this course on TaskLoco

The Diffusers library is the Hugging Face standard for working with image generation models — Stable Diffusion, FLUX, and more.

Quick Start

pip install diffusers accelerate

from diffusers import StableDiffusionPipeline
import torch

pipe = StableDiffusionPipeline.from_pretrained(
    "runwayml/stable-diffusion-v1-5",
    torch_dtype=torch.float16
).to("cuda")

image = pipe("A golden retriever on the moon, photorealistic").images[0]
image.save("output.png")

Supported Models

  • Stable Diffusion 1.5, 2.1, XL
  • FLUX.1 — state-of-the-art open image generation
  • ControlNet — controlled image generation
  • InstructPix2Pix — edit images with text instructions

YouTube • Top 10
Hugging Face University: Diffusers — AI Image Generation in Python
Tap to Watch ›
📸
Google Images • Top 10
Hugging Face University: Diffusers — AI Image Generation in Python
Tap to View ›

Reference:

Diffusers documentation

image for linkhttps://huggingface.co/docs/diffusers

📚 Hugging Face University — Full Course Syllabus
📋 Study this course on TaskLoco

TaskLoco™ — The Sticky Note GOAT