Skip to content

Issues Integrating SuperDiff with Flow Matching Algorithm and other Beta Schedule Methods #3

@SageCao1125

Description

@SageCao1125

Thanks for your amazing work!

I am currently working on integrating the SuperDiff algorithm with the Flow Matching algorithm. Based on the tutorial for SD Superposition_AND & OR, I observed that the get_vel function always predicts epsilon, which is then used to calculate kappa based on the bg & obj's epsilon.

However, if I want to use a model based on FlowMatchEulerDiscreteScheduler, which predicts v=epsilon-x0, I need to align this with the approach provided by SuperDiff that uses epsilon to compute kappa.

To achieve this, I modified the code to use the relationship: xt = sigma*epsilon + (1-sigma)*x0 and v=epsilon-x0.
Then, I derive the predicted epsilon from Flow Matching as: epsilon=xt+(1-sigma)*v.

Using this adjusted epsilon, I proceed with the subsequent kappa calculation. However, I encountered a problem: during the first step, when sigma=1, the kappa becomes NaN. After clipping the values, the results remain significantly poor.

Therefore, I have the following questions:

  1. Does the kappa calculation in the provided SuperDiff code apply only to diffusion-based models with prediction_type=epsilon ? (I believe this is not inherently the case, but I am uncertain if the code needs to be adjusted.)
  2. For a model trained with FlowMatchEulerDiscreteScheduler, which predicts v=epsilon-x0, how can I compute kappa using SuperDiff? Where might my approach be flawed?
  3. Why does the solution in the code correspond to solving a linear equation in theory? I perceive a gap between the code and the theoretical formulation.

I would greatly appreciate any insights or guidance!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions