Ad

RectifiedFlow: Learning Rectified Flows for Generative Modeling

Rectified Flow is an implementation of a novel method for learning transport maps, enabling efficient and diverse generative modeling and domain transfer. It leverages straightened ODE trajectories for one-step generation with improved performance.
Screenshot of gnobitab/RectifiedFlow homepage

Rectified Flow is a novel method for learning transport maps between distributions $\pi_0$ and $\pi_1$ by connecting straight paths between samples and learning an ODE model. The core idea is to iteratively straighten the ODE trajectories through a 'reflow' operation, ultimately achieving one-step generation. This approach aims to overcome limitations of GANs and fast diffusion models, offering higher diversity and better FID scores. It can be applied to generative modeling and unsupervised domain transfer.

This repository provides code, training scripts, and example configurations for replicating and extending the Rectified Flow research. Detailed information on the theoretical properties can be found in the related paper: Rectified Flow: A Marginal Preserving Approach to Optimal Transport.

Key features include comprehensive implementation of the Rectified Flow algorithm, detailed training and evaluation scripts, and clear instructions for data generation and refinement for both 1-step and k-step generation. The repository provides both neural network and non-parametric versions enabling flexible experimentation. It offers a pipeline for generating data pairs for reflow, followed by training and distillation processes to improve performance.

  • Image Generation: Provides scripts for generating images from learned Rectified Flows.
  • Data Reflow: Enables data generation for training 2-step Rectified Flows.
  • Training Scripts: Includes various training scripts for 1-Rectified Flow, 2-Rectified Flow, and distillation processes.
  • Evaluation Pipeline: Follows the evaluation pipeline from the Score SDE paper for assessing model performance.
  • Configuration Flexibility: Supports various configuration options for training, evaluation, and data generation.
  • Community Support: Offers interactive Colab notebooks for guided tutorials.
  • Extensible Architecture: Facilitates extending the algorithm and adapting it for different datasets and tasks.

The project is actively developed with recent commits demonstrating ongoing improvements and bug fixes. The repository includes comprehensive documentation with detailed instructions on installation, configuration, and usage. The presence of example notebooks and clear scripts suggests an active community and continuous maintenance.

This project benefits researchers and practitioners interested in generative modeling, domain transfer, and optimal transport. It enables generating high-quality images and refining existing generative models using a novel approach based on straightened ODE trajectories. The code and documentation provide a valuable resource for reproducing results and conducting further research in this area.

Languages:
Summarize:
Share:
Stars
1,620
Forks
98
Issues
23
Created
3 years ago
Commit
2 years ago
License
None
Archived
No
Updated 22 days ago

Similar Repositories