Jelajahi Sumber

fix fm train bug

lyuxiang.lx 2 minggu lalu
induk
melakukan
1822c5c908
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      cosyvoice/flow/flow_matching.py

+ 1 - 2
cosyvoice/flow/flow_matching.py

@@ -174,8 +174,7 @@ class ConditionalCFM(BASECFM):
 
         # random timestep
         t = torch.rand([b, 1, 1], device=mu.device, dtype=mu.dtype)
-        if self.t_scheduler == 'cosine':
-            t = 1 - torch.cos(t * 0.5 * torch.pi)
+
         # sample noise p(x_0)
         z = torch.randn_like(x1)