rectified-flow  by lqiang67

Unified framework for diffusion and flow models

Created 1 year ago
270 stars

Top 95.4% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

A unified PyTorch codebase for diffusion and flow models, rectified-flow simplifies training and inference by offering a flexible, easy-to-use platform for rapid prototyping. It targets researchers and engineers working with generative models, providing a streamlined approach to implementing and experimenting with Rectified Flow (RF) and diffusion techniques. The library's core benefit is its automated algorithm derivation and seamless integration capabilities.

How It Works

The project employs a unified Ordinary Differential Equation (ODE) framework for both Rectified Flow and diffusion models, incorporating techniques like flow matching and reflow for accelerated sampling. Its key innovation is a symbolic solver that automates the derivation of algorithms and formulas for various model representations (score functions, velocity fields, noise predictions), eliminating manual derivation. This approach also facilitates easy conversion between different interpolation schemes and integration with state-of-the-art models like Flux.

Quick Start & Requirements

Highlighted Details

  • Achieves strong performance on CIFAR10 with UNet (FID 2.496) and DiT (FID 3.678) models.
  • Features a symbolic solver for automated derivation of flow/diffusion algorithms and automatic conversion between interpolation schemes.
  • Provides Diffusers-style training scripts utilizing Accelerate for efficient multi-GPU training.
  • Offers straightforward integration with state-of-the-art models such as Flux.

Maintenance & Community

The repository includes author information via a citation but does not explicitly list community channels (e.g., Discord, Slack) or detailed contributor/sponsorship information.

Licensing & Compatibility

The codebase is distributed under the MIT License, which is permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

The MyStochasticSampler is theoretically sound only when the source distribution ($\pi_0$) is a zero-mean Gaussian and the coupling $(X_0, X_1)$ is independent. Users should proceed with caution if these conditions are not met.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
14 stars in the last 30 days

Explore Similar Projects

Starred by Benjamin Bolte Benjamin Bolte(Cofounder of K-Scale Labs), Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), and
10 more.

consistency_models by openai

0.1%
6k
PyTorch code for consistency models research paper
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.