fix: gpu change to cpu overhead (#656)

* fix: gpu change to cpu overhead

* Update .gitignore

---------

Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
This commit is contained in:
周文阳
2024-08-02 00:42:27 +08:00
committed by GitHub
parent 6e2b0aef5b
commit e483d55104
2 changed files with 4 additions and 5 deletions
+1 -2
View File
@@ -160,13 +160,12 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/
# MacOS System
.DS_Store
# assets and configs of ChatTTS
/asset
/config
+3 -3
View File
@@ -567,9 +567,9 @@ class ModelRunner:
# )
results = []
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()
idx_next_i = idx_next[i, 0, :].tolist()
logprob_i = logprob[i].tolist()
tmp_hidden_states = hidden_states[i]
if input_tokens[i].shape[-2] != 1:
tmp_hidden_states = tmp_hidden_states[-1:, :]
result = SequenceGroupOutput(