Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions mova/diffusion/pipelines/mova_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,10 +1386,18 @@ def training_step(
mode_scale=1.0,
independent_timesteps=False,
)
# The sigma_shift formula in flow_match.py L57:
# sigma_shifted = shift * sigma_linear / (1 + (shift - 1) * sigma_linear)
# boundary_ratio is in shifted space; invert to get sigma_linear:
# sigma_linear = boundary_ratio / (shift - (shift - 1) * boundary_ratio)
# index_boundary = 1 - sigma_linear, which simplifies to:
# shift * (1 - boundary_ratio) / (1 + (shift - 1) * (1 - boundary_ratio))
# e.g. shift=3, boundary_ratio=0.9 => sigma_linear=0.75 => index=0.25
boundary = self.scheduler.shift * (1 - self.boundary_ratio) / (1 + (self.scheduler.shift - 1) * (1 - self.boundary_ratio))
if global_step % 2 == 0:
timestep_config.max_timestep_boundary = self.boundary_ratio
timestep_config.max_timestep_boundary = boundary
else:
timestep_config.min_timestep_boundary = self.boundary_ratio
timestep_config.min_timestep_boundary = boundary

timestep, audio_timestep = self.sample_timestep_pair(timestep_config)
timestep = timestep.to(device=device)
Expand Down