atong01 / conditional-flow-matching

TorchCFM: a Conditional Flow Matching library
https://arxiv.org/abs/2302.00482
MIT License
1.27k stars 103 forks source link

code for RectifiedFlow #150

Closed arakotom closed 13 hours ago

arakotom commented 1 week ago

Hello,

Thank you very much for this nice package. I wanted to kindly ask if, as stated in the implemented papers section, the code for RectifiedFlow (Liu et al 2023) is provided?

Alain

kilianFatras commented 1 week ago

Hi @arakotom,

To get 1-Rectified Flow, you just need to use the I-CFM method with \sigma=0.0. If you want to use k-rectified flow, you will need to retrain k times the models between noisy samples and their generated samples counterparts.

arakotom commented 1 week ago

Hi @kilianFatras ,

thanks for the answer. so in a nutshell, for the k-rectified flow, I need to recode myself all the boilerplates/loops about generating samples and retraining again with I-CFM.

atong01 commented 1 week ago

Hi @arakotom,

Correct, we don't have a simple example for this. Would be great to add one. To check out how I ran it for the paper you can look here:

https://github.com/atong01/conditional-flow-matching/blob/62c44affd877a01b7838d408b5dc4cbcbf83e3ad/runner/src/models/cfm_module.py#L539

kilianFatras commented 13 hours ago

Closing as solved