dpm-solver  by LuChengTHU

Fast ODE solver for diffusion probabilistic model sampling

created 3 years ago
1,738 stars

Top 25.2% on sourcepulse

GitHubView on GitHub
Project Summary

DPM-Solver provides a fast, high-order ODE solver specifically designed for diffusion probabilistic models, enabling high-quality sample generation in as few as 10-20 steps. It supports both discrete-time and continuous-time diffusion models without requiring additional training, making it a versatile tool for researchers and practitioners in generative AI.

How It Works

DPM-Solver implements a family of solvers for the underlying ODEs of diffusion models. It offers both single-step (Runge-Kutta-like) and multi-step (Adams-Bashforth-like) methods with convergence orders up to 3. The improved DPM-Solver++ variant incorporates dynamic thresholding for enhanced sample quality in pixel-space models. The library provides a model_wrapper to seamlessly integrate various diffusion model types (noise, data, velocity, score prediction) and sampling strategies (unconditional, classifier, classifier-free guidance).

Quick Start & Requirements

  • Install: Typically integrated via libraries like diffusers. For direct use, copy dpm_solver_pytorch.py or dpm_solver_jax.py.
  • Prerequisites: PyTorch or JAX. GPU recommended for performance.
  • Resources: Integration with diffusers simplifies setup. Direct usage requires defining noise schedules and model wrappers.
  • Docs: Official Documentation

Highlighted Details

  • Achieves high-quality samples in 10-20 steps, significantly faster than traditional methods.
  • Supports multiple diffusion model types (noise, x_start, v, score prediction).
  • Offers both single-step and multi-step solvers with varying orders (1-3).
  • DPM-Solver++ includes dynamic thresholding for improved pixel-space image quality.
  • Integrates with popular libraries like diffusers, Stable-Diffusion, and DeepFloyd-IF.

Maintenance & Community

The project is associated with academic research from Tsinghua University. It has seen significant adoption and integration into major diffusion model libraries.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. Users should verify licensing for commercial or closed-source use.

Limitations & Caveats

The README suggests that DPM-Solver cannot improve sample quality if the base diffusion model performs poorly with 1000-step DDIM. Dynamic thresholding is noted as only valid for pixel-space diffusion models.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
63 stars in the last 90 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), Travis Fischer Travis Fischer(Founder of Agentic), and
3 more.

consistency_models by openai

0.0%
6k
PyTorch code for consistency models research paper
created 2 years ago
updated 1 year ago
Feedback? Help us improve.