mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-05 18:09:24 +08:00
fix fm train bug
This commit is contained in:
@@ -174,8 +174,7 @@ class ConditionalCFM(BASECFM):
|
|||||||
|
|
||||||
# random timestep
|
# random timestep
|
||||||
t = torch.rand([b, 1, 1], device=mu.device, dtype=mu.dtype)
|
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)
|
# sample noise p(x_0)
|
||||||
z = torch.randn_like(x1)
|
z = torch.randn_like(x1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user