Update app.py UI, adjust streaming_prefix_len, remove legacy docs

- Refine app.py: Ultimate Cloning naming, NFE slider, i18n polish
- Change streaming_prefix_len default from 3 to 4 for smoother decoding
- Remove legacy docs/ directory (migrated to ReadTheDocs)

Made-with: Cursor
This commit is contained in:
Labmem-Zhouyx
2026-04-03 18:42:41 +08:00
parent b823d8107c
commit 0c2cf23617
6 changed files with 109 additions and 777 deletions
+3 -3
View File
@@ -476,7 +476,7 @@ class VoxCPM2Model(nn.Module):
retry_badcase_max_times: int = 3,
retry_badcase_ratio_threshold: float = 6.0,
streaming: bool = False,
streaming_prefix_len: int = 3,
streaming_prefix_len: int = 4,
) -> Generator[torch.Tensor, None, None]:
if retry_badcase and streaming:
warnings.warn("Retry on bad cases is not supported in streaming mode, setting retry_badcase=False.")
@@ -775,7 +775,7 @@ class VoxCPM2Model(nn.Module):
retry_badcase_max_times: int = 3,
retry_badcase_ratio_threshold: float = 6.0,
streaming: bool = False,
streaming_prefix_len: int = 3,
streaming_prefix_len: int = 4,
) -> Generator[Tuple[torch.Tensor, torch.Tensor, Union[torch.Tensor, List[torch.Tensor]]], None, None]:
"""
Generate audio using pre-built prompt cache.
@@ -964,7 +964,7 @@ class VoxCPM2Model(nn.Module):
inference_timesteps: int = 10,
cfg_value: float = 2.0,
streaming: bool = False,
streaming_prefix_len: int = 3,
streaming_prefix_len: int = 4,
) -> Generator[Tuple[torch.Tensor, Union[torch.Tensor, List[torch.Tensor]]], None, None]:
"""Core inference method for audio generation.