conditional-flow-matching
conditional-flow-matching copied to clipboard
Typo in comment: wrong formula in compute_conditional_flow docstring (line ~372)
File: conditional-flow-matching/torchcfm/conditional_flow_matching.py
Approx. line: 372 (in TargetConditionalFlowMatcher.compute_conditional_flow)
The docstring currently says:
def compute_conditional_flow(self, x0, x1, t, xt):
"""Compute the conditional vector field ut(x1|x0) = (x1 - (1 - sigma) t)/(1 - (1 - sigma)t), see Eq.(21) [2]."""
There's a typo in compute_conditional_flow() where the numerator of the target conditional flow uses the time scalar t instead of the position x (code variable xt). The correct formula is
$u_t(x|x_1) = \frac{x_1 − (1 − \sigma_{\text{min}}) x}{ 1 − (1 − \sigma_{\text{min}})t} \tag{21}.$