Skip to content

Commit

Permalink
fix: idx error when do repetition penalty (#738)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
niuzheng168 and Ubuntu committed Aug 31, 2024
1 parent a82e1df commit 3990f0e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ChatTTS/model/velocity/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ def execute_model(
for i in range(self.post_model.num_vq)
]
input_emb = torch.stack(code_emb, 3).sum(3)
start_idx = input_tokens_history.shape[-2] - 1 if input_tokens_history.shape[-2] > 0 else 0
else:
input_emb = self.post_model(input_tokens, text_mask)
# print(input_emb.shape)
Expand Down

0 comments on commit 3990f0e

Please sign in to comment.