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
7 changes: 5 additions & 2 deletions mova/diffusion/pipelines/mova_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,10 +1386,13 @@ def training_step(
mode_scale=1.0,
independent_timesteps=False,
)
# Look up the index boundary directly from the scheduler's timestep table.
# boundary_ratio=0.9 means timestep 900; count how many timesteps >= 900 to get the index fraction.
boundary = (self.scheduler.timesteps >= self.boundary_ratio * self.scheduler.num_train_timesteps).sum().item() / self.scheduler.num_train_timesteps
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