We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0e6cd8 commit 51ec0c7Copy full SHA for 51ec0c7
ChatTTS/model/gpt.py
@@ -416,6 +416,7 @@ def generate(
416
)
417
inputs_ids_buf.narrow(1, 0, progress).copy_(inputs_ids)
418
del inputs_ids
419
+ inputs_ids = inputs_ids_buf.narrow(1, 0, progress)
420
421
pbar: Optional[tqdm] = None
422
@@ -430,8 +431,6 @@ def generate(
430
431
432
for i in range(max_new_token):
433
- inputs_ids = inputs_ids_buf.narrow(1, 0, progress)
434
-
435
model_input = self._prepare_generation_inputs(
436
inputs_ids,
437
past_key_values,
@@ -606,6 +605,7 @@ def generate(
606
605
607
del idx_next
608
progress += 1
609
610
not_finished = finish.logical_not().to(end_idx.device)
611
end_idx.add_(not_finished.int())
0 commit comments