[Perf]: Speedup VoxCPM2 TTS performance and Support PagedAttention (#2690)
Signed-off-by: Sy03 <1370724210@qq.com> Signed-off-by: Yueqian Lin <linyueqian@outlook.com> Co-authored-by: Yueqian Lin <linyueqian@outlook.com> Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
This commit is contained in:
9 files changed
+1325
-440
No files matched your search
@@ -58,12 +58,12 @@ The script accepts the following arguments:
|
||||
|
||||
## Performance
|
||||
|
||||
Measured on a single H20 GPU (80 GB), voxcpm 0.0.0, PyTorch 2.10.0+cu128:
|
||||
Measured on a single H20 GPU (80 GB):
|
||||
|
||||
| Input length | RTF | Sample rate |
|
||||
|---|---|---|
|
||||
| Short (~6 words) | ~0.81 | 48 kHz |
|
||||
| Long (~50 words) | ~0.72 | 48 kHz |
|
||||
| Short (~10 tokens) | ~0.28 | 48 kHz |
|
||||
| Long (~100 tokens) | ~0.34 | 48 kHz |
|
||||
|
||||
RTF < 1.0 means faster than real time.
|
||||
|
||||
|
||||
@@ -71,10 +71,10 @@ def parse_args():
|
||||
def extract_audio(multimodal_output: dict) -> torch.Tensor:
|
||||
"""Extract the final complete audio tensor from multimodal output.
|
||||
|
||||
The output processor accumulates per-step full audio under ``audio``
|
||||
as a list. The last element is the complete waveform.
|
||||
The output processor concatenates per-step delta tensors under
|
||||
``model_outputs``. Falls back to ``audio`` for backwards compat.
|
||||
"""
|
||||
audio = multimodal_output.get("audio") or multimodal_output.get("model_outputs")
|
||||
audio = multimodal_output.get("model_outputs") or multimodal_output.get("audio")
|
||||
if audio is None:
|
||||
raise ValueError(f"No audio key in multimodal_output: {list(multimodal_output.keys())}")
|
||||
|
||||
|
||||
Reference in new issue
Block a user