This repository is the official PyTorch library for Flow Matching generative models, developed by Meta FAIR. It provides a modular and extensible framework for implementing continuous, discrete, and Riemannian flow matching algorithms. The core library consists of four main components: probability paths (defining how data transforms from noise to samples), schedulers (noise/time schedules), solvers (ODE or CTMC integration for sampling), and loss functions (e.g., mixture path generalized KL divergence). It also includes utilities for common operations like model wrapping, manifold geometry (Euclidean, sphere, flat torus), and categorical sampling. The library is designed to be flexible, allowing researchers to easily combine different paths, schedulers, and solvers. Beyond the core library, the repository contains extensive examples for image generation (pixel-space continuous and discrete flow matching on CIFAR-10 and ImageNet) and text generation (discrete flow matching on FineWeb-Edu and Wikitext-103). These examples include full training pipelines, evaluation scripts, and model architectures (UNet, DiT-like transformer). The code is research-grade but well-structured, with clear separation of concerns and thorough unit tests for core components. While the examples are somewhat tied to specific datasets and hardware configurations, the library itself is a reusable foundation for any flow matching project. The repository is a hybrid of a research codebase and a production-ready library. The core modules are abstracted and documented, making them suitable for integration into other projects. However, the examples contain research artifacts like hardcoded paths and experimental features (torch.compile, mixed precision) that may require adaptation. Overall, this is a high-quality, actively maintained resource for anyone working on generative modeling with flow matching.