TL;DR: Flow Matching is a generative AI training method that learns how to move noise into data by matching vector fields, not denoising step by step. It powers models like FLUX, MovieGen, F5-TTS, and E2-TTS, offering faster, flexible generation.
Flow Matching (FM) is a method for training generative models to transform simple noise into realistic data by learning the “flow” between probability distributions. It trains a model to predict how data should move over time.
This concept might sound complex but is more approachable than it seems. If it feels overwhelming at first, don’t worry – by the end of this episode, you’ll have a clear understanding of its key ideas and practical applications.
Why is Flow Matching worth discussing now? It is gaining attention for its role in top generative models like Flux (text-to-image), F5-TTS and E2-TTS (text-to-speech), and Meta’s MovieGen (text-to-video). It has become one of the most important alternatives to classic diffusion-style generation. These models consistently achieve state-of-the-art results, and some experts argue that FM might even surpass diffusion models. But why is that the case?
FM enhances Continuous Normalizing Flows (CNFs), a framework for generating realistic samples of complex data – whether images, audio, or text – starting from structured noise. While powerful, CNFs face challenges such as long training times and intricate techniques for speeding up sampling. Flow Matching tackles these issues by optimizing the path from noise to structured outputs, streamlining CNFs and reducing the inefficiencies caused by differential equation computations. Put simply, FM focuses on learning how to match flows of probability distributions over time.
Still sounds tricky? Let’s break it all down, examine the details, and provide real-world examples of its implementation so you can see its potential in action. Let’s get started!
In today’s episode, we will cover:
Continuous Normalizing Flows (CNFs) and their limitations
What Is Flow Matching? A Simulation-Free Training Method
How does Flow Matching work?
How does Conditional Flow Matching (CFM) help?
Flow Matching vs Diffusion Models: Key Differences
Advantages of Flow Matching
Not without limitations
Conclusion and implementation
Bonus: Resources to dive deeper
Continuous Normalizing Flows (CNFs) and their limitations
Let’s start from the very beginning and make clear what are the Continuous Normalizing Flows (CNFs).
CNFs are a type of flexible framework or mathematical tool used in generative modeling to transform simple data (like random noise) into complex distributions (like realistic images or sounds). Unlike diffusion models, which slowly add and remove noise and have limited ways of data processing, CNFs can handle a broader range of data transformations. They do this by gradually and smoothly reshaping the data using a process guided by a vector field. Let’s break it down in simple terms.
Key concepts of CNFs:
Data space: This is where the data “lives”. For example, an image with pixels could exist in a high-dimensional space with a fixed number of pixels.
Probability density path: Probability density path describes how the data's probability distribution evolves over time. Imagine data as points in a space. To move from a simple noise to realistic data, we use a probability path, which is a gradual transformation.
Vector field: Think of it as a map that guides how data points should move at every moment to realize the transformation.
Flow: And finally, flow reshapes the data step by step over time, guided by the vector field. It defines a continuous transformation. But to be more accurate in terms, in CNFs, you need to solve an Ordinary Differential Equation (ODE), that tells how data moves based on the vector field. This turns the transformation into a flow of probability over time.
Instead of manually creating the vector field, researchers use a neural network to learn it. This neural network is like GPS – it takes data points as input and predicts where they should move to match the desired distribution. The network reshapes the data into a realistic and complex data distribution, such as a detailed image or piece of music, using a rule called the push-forward equation, which ensures that the transformation follows the rules of probability (the total probability remains 1 at all times).
This smooth, continuous transformation from noise to data is CNFs’ main advantage, which makes them a powerful tool for generative modeling. However, CNFs have a serious limitation – solving Ordinary Differential Equations during training is slow, difficult and computationally expensive.
What Is Flow Matching? A Simulation-Free Training Method
Flow Matching is a faster and simpler way to train CNFs without the need for expensive simulations. The concept of Flow Matching in generative modeling was first introduced by Meta AI FAIR and Weizmann Institute of Science researchers in 2022 in the paper "Flow Matching for Generative Modeling".
FM builds on techniques like Normalizing Flows and diffusion models, but it takes a smarter and more efficient approach to transform data distributions. Flow Matching is a simulation-free method to train CNFs, making them faster, more efficient, and more flexible, while still leveraging the powerful capabilities of CNFs.
Instead of solving ODEs during training, FM uses a regression-based objective to directly match a learned vector field (from a neural network) to a target vector field. This avoids the computational burden of integrating ODEs in the training phase. But how does this process look like?
How does Flow Matching work?
Flow Matching trains CNFs by comparing the path of transformation, rather than solving the entire process (ODEs) at every step. Think of it as training a "map" (vector field) that shows how data points move from one distribution to another. FM supports various probability paths for transforming data, going beyond diffusion-based methods. Let’s break the whole FM idea into smaller and clear concepts.
Key concepts of Flow Matching:
Transforming distributions: The idea of FM is to gradually transform a simple, known probability distribution (like noise) into a complex target distribution (like real-world data distribution) using a learned flow field. This transformation is represented as a path between distributions over time.
Vector field learning: Instead of modeling the entire data transformation in one go, FM learns a vector field that describes how data points move from one distribution to the next along the probability path.
Probability paths: These are predefined trajectories in probability space that data points follow during the transformation. FM aims to align its learned flow with these paths.
Neural networks: It’s a learnable approximation of the vector field, trained to match the actual vector field.
Training objective: The method minimizes the mismatch between the probability flow path and the learned flow by solving a supervised regression problem. When the loss is minimized, the neural network accurately models the transformations, and the CNF can generate the desired distributions.
In easy words, the process of FM looks like this:
Imagine we have two data shapes, for example, a Gaussian blob (source or starting point) and a spiral (target).
To get from the blob to the spiral, we start with a simple guess: points move in straight lines at constant speeds. This is a rough estimate and often leads to crossing paths.
The model learns a vector field, which is like a "wind map" guiding how points move over time.
It averages the motion of many particles to figure out the smoothest way to flow the source into the target.

Image credit: Flow With What You Know blog
However, directly computing the marginal probability paths (the overall evolution of the entire dataset as a probability distribution over time) and the vector field is often intractable. Flow Matching overcomes this with another improved technique, proposed in the same study.
How does Conditional Flow Matching (CFM) help?
Inspired by existing techniques like denoising score matching in diffusion models, Conditional Flow Matching (CFM) simplifies training even further. CFM introduces the following strategies to make Flow Matching practical for training complex models:
Focus on conditional probability paths:
Instead of directly modeling the entire transformation, CFM constructs simpler conditional paths for individual data samples and their associated vector fields rather than global ones. They are easier to work with and don't need detailed information about the entire transformation process. This effectively breaks down a global problem into simpler, local problems.
Simplifying the loss function:
While the Flow Matching loss requires knowledge of the entire marginal probability path and vector field, focusing on smaller conditional paths and vector fields results in a simpler and more computable objective.
Equivalence to Flow Matching:
Despite simplifying the problem, CFM ensures that optimizing the Conditional Flow Matching loss produces the same gradients as the full FM objective. So CFM can maintain the theoretical guarantees of FM while being more efficient in practice and allowing scalable training on large datasets.
In short, CFM is like building a smarter GPS system for moving data points between distributions, making the process faster and more adaptable and scalable to high-dimensional datasets.

Conditional paths. Image Credit: An introduction to Flow Matching, Cambridge MLG Blog
These paths of individual data points may cross during training, which can confuse the model. And what is important is that Flow Matching approach focuses on transforming distributions, not just specific points. So the system learns to estimate these trajectories into one general flow, which is not crossed and allows the whole flow process to be reversible.

Marginal paths. Image Credit: An introduction to Flow Matching, Cambridge MLG Blog
Flow Matching vs Diffusion Models: Key Differences
While in CNFs, differential equations define data distributions, in diffusion models, data is progressively "noised" and then denoised along a probability trajectory, using stochastic processes (randomness). It also requires score matching techniques for training.
There is a common opinion, that diffusion models follow curved diffusion probability paths because of adding noise and then removing it, while FM is often said to create "straight paths," but this is only true if the model perfectly predicts a single data point.
However, Google DeepMind’s researchers clarified that this is not always true.
In real-world scenarios (like working with images), in FM the predictions average over a distribution, leading to paths that can look curved, depending on the data’s structure and distribution. And on the contrary, deterministic samplers in diffusion models can produce paths that resemble straight lines in specific conditions, making them behave similarly to flow matching.
FM and diffusion models are equally effective, but have several differences:
FM prefers linear interpolation, while diffusion models rely on noise schedules.
Difference in sampling:
Diffusion is usually stochastic (a bit random), especially in simpler setups.
Flow matching can work with deterministic paths, and that’s why is less random.
Diffusion models work in a "low-resolution" space, which can slow down training and sampling. FM operates in a higher-resolution space than diffusion models, leading to faster and more efficient training.
Since FM and diffusion models are mathematically equivalent, you can mix and match techniques from both. For instance, train using one method and sample using another, or use flow matching to simplify the training paths but borrow diffusion’s techniques for dealing with randomness.
Flow Matching can also enhance diffusion models, making them faster and more flexible and accurate, because FM supports a wider range of probability paths, including:
Optimal Transport (OT) paths, that are straight-line trajectories between noise and data.
Curved paths or other complex paths tailored to the specific needs of the data.
Here’s a brief summary of advantages of diffusion models enhanced by FM:

Performance of models with Flow Matching
Now, let’s look at the “numbers” to analyze how good the FM method’s performance is and if it really leads to enhanced generative models’ performance.
FM with diffusion and FM with Optimal Transport (FM-OT) were compared against popular diffusion-based methods like DDPM (Denoising Diffusion Probabilistic Models), Score Matching, and Score Flow on datasets, such as CIFAR-10 and ImageNet (at 32×32, 64×64, and 128×128 resolutions). Results include:

Image Credit: “Flow Matching for Generative Modeling” paper

Image Credit: “Flow Matching for Generative Modeling” paper
Here NLL is Negative Log-Likelihood, that shows how well the model captures data distributions.
FM-OT achieves competitive results compared to other state-of-the-art models. Here are the key takeaways:
OT paths allow FM to generate high-quality samples with fewer steps (NFEs), achieving better trade-offs between quality and computational cost.
With diffusion paths, noise dominates the image for most of the generation process, and clear images only appear near the end. On the other hand, OT paths images begin forming earlier in the process, leading to faster and more interpretable sampling trajectories.
FM-OT achieves lower numerical error with fewer NFEs compared to diffusion models.
FM-OT achieves better FID (quality of generated samples) with fewer computational resources.
Flow Matching is also effective for conditional tasks, such as upsampling low-resolution images from 64×64 to 256×256.

Image Credit: “Flow Matching for Generative Modeling” paper
Advantages of Flow Matching
As usual, we’ll summarize all the benefits of Flow Matching in one place for your convenience.
Efficiency: FM avoids solving complex ODEs during training, making it faster and scalable to large datasets, like ImageNet.
Flexibility: It works with a wider range of transformations compared to Normalizing Flows and diffusion models, including commonly used in diffusion models and Optimal Transport (OT).
High quality: Models with FM generate higher-quality outputs (like sharper and more realistic images).
Stability: FM avoids some of the numerical instabilities common in other methods for generative modeling.
Also here’s a summary of CNFs with Flow Matching advantages compared against traditional CNFs:

Flow Matching limitations
Despite Flow Matching introduces significant improvements in training and sampling efficiency for generative models, like any approach, it has its limitations and challenges:
Dependence on target probability paths: Poorly chosen paths can result in inefficient training or degraded performance, especially for complex data.
Lack of exact ground truth for marginal vector fields: Success of FM depends on the quality of Conditional Flow Matching (CFM) approximations.
Stability of conditional paths: Conditional paths, such as OT paths, are sensitive to hyperparameter tuning.
Recourse consumption for larger datasets: For large datasets like ImageNet, FM demands significant computational resources.
Conclusion and implementation
Flow Matching is now central to several high-profile generative systems, especially in text-to-image, text-to-video, and speech generation. It is already employed in state-of-the-art models like Flux, MovieGen, F5-TTS, and E2-TTS, demonstrates its potential to revolutionize generative modeling. By enhancing Continuous Normalizing Flows (CNFs) with innovative techniques like Conditional Flow Matching (CFM), it offers a more efficient and flexible alternative to traditional approaches, addressing challenges such as slow training times and computational inefficiencies.
This method promises not only faster and more reliable generative workflows but also higher-quality outputs, making it a cornerstone for the next wave of generative AI advancements. Whether applied to text-to-image, text-to-video, or speech synthesis, Flow Matching's ability to optimize complex data transformations ensures its place in shaping the future of cutting-edge AI models.
FAQ
What is flow matching in generative AI?
Flow Matching is a training method for generative models that learns how to transform a simple distribution, such as noise, into a complex data distribution, such as images, audio, or video. It does this by training a neural network to match a vector field – the direction and speed that data points should follow over time.
What is the difference between flow matching and diffusion models?
Diffusion models usually learn to generate data by adding noise and then reversing that process through denoising. Flow Matching instead learns a flow field that moves samples from noise to data along a probability path. In practice, both approaches are closely related, but Flow Matching is often described as more flexible because it supports different paths, including optimal transport paths, and can make training or sampling more efficient.
What is conditional flow matching?
Conditional Flow Matching is a practical version of Flow Matching that trains on simpler conditional paths tied to individual data samples or conditions. Instead of modeling the entire global probability path directly, it learns local conditional vector fields that are easier to compute. This makes Flow Matching scalable for high-dimensional generative tasks such as text-to-image, speech, and video generation.
What models use flow matching?
Flow Matching or closely related rectified-flow methods are used in several modern generative AI systems, including FLUX for text-to-image generation, Meta’s MovieGen for text-to-video, F5-TTS and E2-TTS for text-to-speech, and Stable Diffusion 3-style rectified-flow / flow-matching image models. The broader trend is clear: many frontier image, video, and audio generators now rely on flow-based training rather than classic diffusion alone.
Is flow matching better than diffusion?
Not universally. Flow Matching can be faster, more flexible, and easier to train in some settings, especially when using efficient probability paths such as optimal transport. Diffusion models remain strong, widely used, and deeply optimized. In practice, modern systems often mix ideas from both families, so the difference is less about “winner vs loser” and more about which training path, sampler, and architecture work best for a given task.








