Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect implementation of TargetConditionalFlowMatcher #156

Open
Rattko opened this issue Jan 5, 2025 · 3 comments
Open

Incorrect implementation of TargetConditionalFlowMatcher #156

Rattko opened this issue Jan 5, 2025 · 3 comments

Comments

@Rattko
Copy link

Rattko commented Jan 5, 2025

Hey,

I've been experimenting with Conditional Flow Matching for a paper I'm currently working on and I've noticed that you have an incorrect implementation of TargetConditionalFlowMatcher, in particular, the sample_xt and compute_conditional_flow methods. The current implementation (rewritten 1:1 in Jax) completely fails to learn even the simplest distributions.

I believe that sample_xt should use x0 instead of epsilon and compute_conditional_flow should return x1 - (1 - self.sigma) * x0 instead of what it currently returns.

Hope this helps ;)

@atong01
Copy link
Owner

atong01 commented Jan 6, 2025

Hi,

I think the current implementation here is correct. The TargetConditionalFlowMatcher explicitly does not depend on x0, as is specified in the Lipman et al. paper.

Note that this only works for initial distributions which are standard normal. Perhaps this is why it is not working in your case?

Thanks,
Alex

@Rattko
Copy link
Author

Rattko commented Jan 9, 2025

Hmm, my prior distribution is the Standard normal and yet I couldn't make the training work with your implementation. I'll try to create a minimal working example and get back to you

@atong01
Copy link
Owner

atong01 commented Jan 9, 2025

Cool thanks! Let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants