# TorchCFM: a Conditional Flow Matching library
[](https://arxiv.org/abs/2302.00482)
[](https://arxiv.org/abs/2307.03672)
[](https://pytorch.org/get-started/locally/)
[](https://pytorchlightning.ai/)
[](https://hydra.cc/)
[](https://black.readthedocs.io/en/stable/)
[](https://github.com/pre-commit/pre-commit)
[](https://github.com/atong01/conditional-flow-matching/actions/workflows/test.yaml)
[](https://codecov.io/gh/atong01/conditional-flow-matching/)
[](https://github.com/atong01/conditional-flow-matching/actions/workflows/code-quality-main.yaml)
[](https://github.com/atong01/conditional-flow-matching#license)

[](https://pepy.tech/project/torchcfm)
[](https://pepy.tech/project/torchcfm)
## Description
Conditional Flow Matching (CFM) is a fast way to train continuous normalizing flow (CNF) models. CFM is a simulation-free training objective for continuous normalizing flows that allows conditional generative modeling and speeds up training and inference. CFM's performance closes the gap between CNFs and diffusion models. To spread its use within the machine learning community, we have built a library focused on Flow Matching methods: TorchCFM. TorchCFM is a library showing how Flow Matching methods can be trained and used to deal with image generation, single-cell dynamics, tabular data and soon SO(3) data.