From 045c861ed0a1c8189fd181edc15f44f62665a141 Mon Sep 17 00:00:00 2001 From: Mr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:51:21 +0530 Subject: [PATCH] fix: avoid variable shadowing in compute_loss by using _ for unused dimension --- cosyvoice/flow/flow_matching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosyvoice/flow/flow_matching.py b/cosyvoice/flow/flow_matching.py index d3beb9ec2..3f992cdbd 100644 --- a/cosyvoice/flow/flow_matching.py +++ b/cosyvoice/flow/flow_matching.py @@ -170,7 +170,7 @@ def compute_loss(self, x1, mask, mu, spks=None, cond=None, streaming=False): y: conditional flow shape: (batch_size, n_feats, mel_timesteps) """ - b, _, t = mu.shape + b, _, _ = mu.shape # random timestep t = torch.rand([b, 1, 1], device=mu.device, dtype=mu.dtype)