From 5503a5891b484f7907bf8fb91e74d65ce9280232 Mon Sep 17 00:00:00 2001 From: Mr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com> Date: Wed, 11 Feb 2026 23:45:46 +0530 Subject: [PATCH] fix: correct torch.randint upper bound to include both values --- GPT_SoVITS/AR/models/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPT_SoVITS/AR/models/utils.py b/GPT_SoVITS/AR/models/utils.py index cc4f24d8..f3b08a9f 100644 --- a/GPT_SoVITS/AR/models/utils.py +++ b/GPT_SoVITS/AR/models/utils.py @@ -262,7 +262,7 @@ def make_reject_y(y_o, y_lens): reject_y = [] reject_y_lens = [] for b in range(bs): - process_item_idx = torch.randint(0, 1, size=(1,))[0] + process_item_idx = torch.randint(0, 2, size=(1,))[0] if process_item_idx == 0: new_y = repeat_P(y_o[b]) reject_y.append(new_y)