https://github.com/g4vrel/cfm
A minimal PyTorch implementation of Flow Matching for Generative Modeling.
https://github.com/g4vrel/cfm
conditional-flow-matching flow-matching implementation-of-research-paper paper-implementation pytorch
Last synced: about 1 month ago
JSON representation
A minimal PyTorch implementation of Flow Matching for Generative Modeling.
- Host: GitHub
- URL: https://github.com/g4vrel/cfm
- Owner: g4vrel
- Created: 2024-12-18T02:45:07.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-12-22T09:36:28.000Z (5 months ago)
- Last Synced: 2025-02-13T06:44:01.293Z (3 months ago)
- Topics: conditional-flow-matching, flow-matching, implementation-of-research-paper, paper-implementation, pytorch
- Language: Python
- Homepage:
- Size: 2.11 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flow Matching for Generative Modeling
A minimal PyTorch implementation of [Flow Matching for Generative Modeling](https://arxiv.org/abs/2210.02747).
This repository implements conditional flow matching with optimal transport probability paths using a U-Net architecture.
Here are some images generated by the model trained on CIFAR-10 for 400K steps:

A helpful reference for my theoretical understanding was the paper [Flow Matching Guide and Code](https://arxiv.org/abs/2412.06264).
---
#### Dependencies
- `pytorch`
- [`einops`](https://einops.rocks/)
- [`torchdiffeq`](https://github.com/rtqichen/torchdiffeq)---
## References
```bibtex
@misc{lipman2023flowmatchinggenerativemodeling,
title={Flow Matching for Generative Modeling},
author={Yaron Lipman and Ricky T. Q. Chen and Heli Ben-Hamu and Maximilian Nickel and Matt Le},
year={2023},
eprint={2210.02747},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2210.02747},
}
``````bibtex
@misc{lipman2024flowmatchingguidecode,
title={Flow Matching Guide and Code},
author={Yaron Lipman and Marton Havasi and Peter Holderrieth and Neta Shaul and Matt Le and Brian Karrer and Ricky T. Q. Chen and David Lopez-Paz and Heli Ben-Hamu and Itai Gat},
year={2024},
eprint={2412.06264},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2412.06264},
}
```
```bibtex
@misc{torchdiffeq,
author={Chen, Ricky T. Q.},
title={torchdiffeq},
year={2018},
url={https://github.com/rtqichen/torchdiffeq},
}
```