Skip to content

Commit 1822c5c

Browse files
committed
fix fm train bug
1 parent 1dcc596 commit 1822c5c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cosyvoice/flow/flow_matching.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ def compute_loss(self, x1, mask, mu, spks=None, cond=None, streaming=False):
174174

175175
# random timestep
176176
t = torch.rand([b, 1, 1], device=mu.device, dtype=mu.dtype)
177-
if self.t_scheduler == 'cosine':
178-
t = 1 - torch.cos(t * 0.5 * torch.pi)
177+
179178
# sample noise p(x_0)
180179
z = torch.randn_like(x1)
181180

0 commit comments

Comments
 (0)