Skip to content

Fix vLLM wrapper bug: noise at the beginning of the speech #639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ChatTTS/model/velocity/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,16 @@ def execute_model(
for i in range(idx_next.shape[0]):
idx_next_i = idx_next[i, 0, :].cpu().tolist()
logprob_i = logprob[i].cpu().tolist()
tmp_hidden_states = hidden_states[i].cpu()
if input_tokens[i].shape[-2] != 1:
tmp_hidden_states = tmp_hidden_states[-1:,:]
result = SequenceGroupOutput(
samples=[
SequenceOutput(
parent_seq_id=seq_groups[i],
logprobs={tuple(idx_next_i): logprob_i},
output_token=tuple(idx_next_i),
hidden_states=hidden_states[i].cpu(),
hidden_states=tmp_hidden_states,
finished=finish[i].item(),
),
],
Expand Down
Loading