Skip to content

Commit

Permalink
Merge pull request #527 from Jerrister/1126
Browse files Browse the repository at this point in the history
Fix sample timesteps
  • Loading branch information
SWivid authored Nov 26, 2024
2 parents d81911b + 5aa4766 commit d8e622f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/f5_tts/model/cfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def fn(t, x):
y0 = (1 - t_start) * y0 + t_start * test_cond
steps = int(steps * (1 - t_start))

t = torch.linspace(t_start, 1, steps, device=self.device, dtype=step_cond.dtype)
t = torch.linspace(t_start, 1, steps + 1, device=self.device, dtype=step_cond.dtype)
if sway_sampling_coef is not None:
t = t + sway_sampling_coef * (torch.cos(torch.pi / 2 * t) - 1 + t)

Expand Down

0 comments on commit d8e622f

Please sign in to comment.