Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkMnDragon committed Dec 28, 2024
1 parent b5d9226 commit 6feb0ac
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions rectified_flow/flow_components/interpolation_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,24 +253,15 @@ def __init__(
b = 0.1
self.alpha = lambda t: torch.exp(-a * (1 - t) ** 2 / 4.0 - b * (1 - t) / 2.0)
self.beta = lambda t: torch.sqrt(1 - self.alpha(t) ** 2)
self.alpha = None
self.beta = None

else:
raise ValueError(
f"Unknown interpolation scheme name '{name}'. Provide a known scheme name "
"or supply custom alpha/beta functions."
)

self.alpha = lambda t: alpha(self.ensure_tensor(t))
self.beta = lambda t: beta(self.ensure_tensor(t))
if dot_alpha is not None:
self.dot_alpha = lambda t: dot_alpha(self.ensure_tensor(t))
else:
self.dot_alpha = None
if dot_beta is not None:
self.dot_beta = lambda t: dot_beta(self.ensure_tensor(t))
else:
self.dot_beta = None

self.solver = AffineInterpSolver()
self.a_t = None
self.b_t = None
Expand Down

0 comments on commit 6feb0ac

Please sign in to comment.