From 923af471d20f61c29855e8d402bb394e36d212cf Mon Sep 17 00:00:00 2001 From: XXXXRT666 <157766680+XXXXRT666@users.noreply.github.com> Date: Mon, 8 Jul 2024 20:51:15 +0800 Subject: [PATCH] Update t2s_model.py (#1283) y is None at no reference mode, and Nonetype object has no attribute shape --- GPT_SoVITS/AR/models/t2s_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPT_SoVITS/AR/models/t2s_model.py b/GPT_SoVITS/AR/models/t2s_model.py index f465b49..31c26cf 100644 --- a/GPT_SoVITS/AR/models/t2s_model.py +++ b/GPT_SoVITS/AR/models/t2s_model.py @@ -528,6 +528,7 @@ class Text2SemanticDecoder(nn.Module): y_pos = None xy_pos = x y = torch.zeros(x.shape[0], 0, dtype=torch.int, device=x.device) + prompts = y ref_free = True x_attn_mask_pad = F.pad( @@ -582,4 +583,4 @@ class Text2SemanticDecoder(nn.Module): if ref_free: return y[:, :-1], 0 - return y[:, :-1], idx - 1 \ No newline at end of file + return y[:, :-1], idx - 1