atong01 / conditional-flow-matching

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

Improvement suggestions for the tutorial on flow matching #88

Open kilianFatras opened 11 months ago

kilianFatras commented 11 months ago

This issue is opened for users to suggest improvements for the Flow Matching tutorial notebook.

radiradev commented 11 months ago

Is it possible to include a minimal example of how a trained model can be used to evaluate the density of a given sample?

atong01 commented 11 months ago

@radiradev Thats a great idea. I can work on this. If you have an immediate need or are interested in making one I can send over a dirty notebook for this.

radiradev commented 11 months ago

@atong01 That would be very much appreciated!

kilianFatras commented 10 months ago

We should give credit to stochastic interpolants and rectified flows at the beginning of the notebook. Basically saying that all 3 methods are similar and concurrent ICLR2023 papers

hinzflorian commented 9 months ago

Hi, there is a typo in Flow_matching_tutorial.ipynb: "optximizer.zero_grad()" ->"optimizer.zero_grad()"

kilianFatras commented 9 months ago

Hi, Thank you! I will correct that shortly.

radiradev commented 9 months ago

Is it possible to include a minimal example of how a trained model can be used to evaluate the density of a given sample?

Hi @atong01, could you please share your example notebook on how this is done? I saw here that to evaluate the density an ode must be solved, but I am not sure how to accomplish this in pytorch:

jax-fmx

harveymannering commented 8 months ago

Hello,

I cannot run the last cell in the Flow_matching_tutorial.ipynb notebook because the sample_xt function is not define. Does sample_xt serve the same purpose as sample_conditional_pt? Are the two functions interchangable?

Thank you for the tutorials!

kilianFatras commented 8 months ago

Oh that’s indeed a typo… I changed the name of the function last minute and forgot to change this. You are right! The correct function is sample_conditional_pt.

Edit: I have pushed a corrected tutorial.

csufangyu commented 6 months ago

We should give credit to stochastic interpolants and rectified flows at the beginning of the notebook. Basically saying that all 3 methods are similar and concurrent ICLR2023 papers

Your suggestion is fantastic, I'm a beginner and it looks like there is no difference between stochastic interpolants and rectified flows, except that stochastic interpolants have an extra random term and rectified flows seem to be a deterministic sampling, is my understanding Is my understanding correct? I look forward to your reply, thanks!