From 438dd9ed334088f7c2e14f07f9912006f9be73d5 Mon Sep 17 00:00:00 2001 From: James Betker Date: Sat, 8 Jan 2022 08:55:00 -0700 Subject: [PATCH] fix text-voice-clip bug --- codes/models/gpt_voice/text_voice_clip.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codes/models/gpt_voice/text_voice_clip.py b/codes/models/gpt_voice/text_voice_clip.py index 2cddcfe4..b78f9072 100644 --- a/codes/models/gpt_voice/text_voice_clip.py +++ b/codes/models/gpt_voice/text_voice_clip.py @@ -76,8 +76,7 @@ class VoiceCLIP(nn.Module): speech_tokens = speech_tokens[:, :max_mel_len] b, device = text.shape[0], text.device - if self.text_mask_percentage > 0: - text_mask = torch.rand_like(text.float()) > self.text_mask_percentage + text_mask = torch.rand_like(text.float()) > self.text_mask_percentage text_emb = self.text_emb(text) text_emb += self.text_pos_emb(torch.arange(text.shape[1], device=device))