From 3a9161c979334a6b03c7b572f09a033b27adfd02 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:27:31 +0800 Subject: [PATCH] fix speed control bug fix speed control bug --- GPT_SoVITS/module/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPT_SoVITS/module/models.py b/GPT_SoVITS/module/models.py index 2dffac1..195a59f 100644 --- a/GPT_SoVITS/module/models.py +++ b/GPT_SoVITS/module/models.py @@ -242,7 +242,7 @@ class TextEncoder(nn.Module): y = self.mrte(y, y_mask, text, text_mask, ge) y = self.encoder2(y * y_mask, y_mask) if(speed!=1): - y = F.interpolate(y, size=int(y.shape[-1] * speed)+1, mode="linear") + y = F.interpolate(y, size=int(y.shape[-1] / speed)+1, mode="linear") y_mask = F.interpolate(y_mask, size=y.shape[-1], mode="nearest") stats = self.proj(y) * y_mask m, logs = torch.split(stats, self.out_channels, dim=1)