Flow Matching is a PyTorch library for implementing flow matching algorithms, featuring both continuous and discrete variants with support for text and image modalities.
Flow matching addresses the problem of training generative models by providing a unified framework that interpolates between data and noise distributions. The library implements the core algorithmic components needed to build flow matching models, allowing practitioners to define custom paths through the data-noise space and train models to follow those paths. The approach works by providing building blocks that handle the mathematical operations required for both continuous flows (which operate on real-valued data) and discrete flows (which operate on categorical data like text tokens).
Developers should choose this library if they are building generative models and want a structured implementation of flow matching rather than implementing the algorithms from scratch. It suits projects involving image generation or text modeling where you need to train models end-to-end. The library provides training examples for synthetic data, CIFAR10, face-blurred ImageNet, and text modeling, allowing you to understand the workflow before applying it to your own data. Note that the library does not include pre-trained models; all examples are designed to be trained from scratch with a single command.
The project maintains active development practices with pre-commit hooks enforced to ensure code quality on each commit. The repository includes a contribution guide and provides structured examples across multiple modalities, indicating ongoing investment in making the codebase accessible to contributors and users.