From 087fd245799028f3e284ee40ec794cb8a2564f85 Mon Sep 17 00:00:00 2001 From: wzy3650 <48899243+wzy3650@users.noreply.github.com> Date: Mon, 17 Feb 2025 10:38:04 +0800 Subject: [PATCH] fix inference issue (#2061) Co-authored-by: wangzeyuan --- GPT_SoVITS/AR/models/t2s_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPT_SoVITS/AR/models/t2s_model.py b/GPT_SoVITS/AR/models/t2s_model.py index 8c8ea1a..f8f6582 100644 --- a/GPT_SoVITS/AR/models/t2s_model.py +++ b/GPT_SoVITS/AR/models/t2s_model.py @@ -677,7 +677,7 @@ class Text2SemanticDecoder(nn.Module): # batch_indexs = torch.tensor(batch_idx_map, device=y.device)[removed_idx_of_batch_for_y] for i in removed_idx_of_batch_for_y: batch_index = batch_idx_map[i] - idx_list[batch_index] = idx - 1 + idx_list[batch_index] = idx y_list[batch_index] = y[i, :-1] batch_idx_map = [batch_idx_map[i] for i in reserved_idx_of_batch_for_y.tolist()] @@ -857,7 +857,7 @@ class Text2SemanticDecoder(nn.Module): if ref_free: return y[:, :-1], 0 - return y[:, :-1], idx - 1 + return y[:, :-1], idx def infer_panel(