SOTA-Class TTS at Compact Scale
Python
Use SGLang native compile batch policy
linux295650-uxa25adb5df7c0
diff --git a/README.md b/README.mdindex bcde98e..7a79174 100644--- a/README.md+++ b/README.md@@ -209,7 +209,6 @@ CUDA_VISIBLE_DEVICES=0 \SGLANG_OMNI_ROOT="${SGLANG_OMNI_ROOT}" \MODEL="${MODEL}" \AUDIO8_TTS_ENABLE_TORCH_COMPILE=1 \-AUDIO8_TTS_TORCH_COMPILE_MAX_BS=4 \HOST=0.0.0.0 \PORT=8010 \./sglang_omni/scripts/run_server.sh@@ -232,9 +231,9 @@ The defaults use model name `audio8/tts-0.6b`, BF16, one GPU, a `0.2` staticmemory fraction, and up to 32 running requests. The main runtime controls are`MODEL_NAME`, `AUDIO8_TTS_MEM_FRACTION_STATIC`,`AUDIO8_TTS_MAX_RUNNING_REQUESTS`, `AUDIO8_TTS_CHUNKED_PREFILL_SIZE`, and-`AUDIO8_TTS_DISABLE_CUDA_GRAPH`. Torch compilation covers batch sizes through-4 by default when enabled; adjust `AUDIO8_TTS_TORCH_COMPILE_MAX_BS` for the-expected concurrency and available memory. `AUDIO8_TTS_ATTENTION_BACKEND`+`AUDIO8_TTS_DISABLE_CUDA_GRAPH`. When Torch compilation is enabled, the adapter+uses SGLang's native batch-size policy. Set `AUDIO8_TTS_TORCH_COMPILE_MAX_BS`+only when an explicit compile limit is needed. `AUDIO8_TTS_ATTENTION_BACKEND`defaults to `fa3`; set it to `flashinfer` for consumer Blackwell. Set`SGLANG_OMNI_SITE_PACKAGES` when the runtime dependencies are installed in aseparate site-packages directory.diff --git a/README_zh.md b/README_zh.mdindex 88f5d6b..be0ff11 100644--- a/README_zh.md+++ b/README_zh.md@@ -193,7 +193,6 @@ CUDA_VISIBLE_DEVICES=0 \SGLANG_OMNI_ROOT="${SGLANG_OMNI_ROOT}" \MODEL="${MODEL}" \AUDIO8_TTS_ENABLE_TORCH_COMPILE=1 \-AUDIO8_TTS_TORCH_COMPILE_MAX_BS=4 \HOST=0.0.0.0 \PORT=8010 \./sglang_omni/scripts/run_server.sh@@ -214,8 +213,8 @@ MODEL="${MODEL}" \默认配置使用模型名 `audio8/tts-0.6b`、BF16、单卡、`0.2` 静态显存比例和最多 32 个并发请求。主要运行参数包括 `MODEL_NAME`、`AUDIO8_TTS_MEM_FRACTION_STATIC`、`AUDIO8_TTS_MAX_RUNNING_REQUESTS`、`AUDIO8_TTS_CHUNKED_PREFILL_SIZE` 和-`AUDIO8_TTS_DISABLE_CUDA_GRAPH`。开启 Torch compile 后默认覆盖到 batch size 4,可根据-预期并发和可用显存通过 `AUDIO8_TTS_TORCH_COMPILE_MAX_BS` 调整上限。+`AUDIO8_TTS_DISABLE_CUDA_GRAPH`。开启 Torch compile 后,适配器沿用 SGLang 原生的 batch+策略;只有需要明确限制 compile 上限时才设置 `AUDIO8_TTS_TORCH_COMPILE_MAX_BS`。`AUDIO8_TTS_ATTENTION_BACKEND` 默认为 `fa3`;消费级 Blackwell GPU 应设置为`flashinfer`。如果运行依赖安装在单独的 site-packages 目录中,请设置`SGLANG_OMNI_SITE_PACKAGES`。diff --git a/sglang_omni/OPTIMIZATION_REPORT.md b/sglang_omni/OPTIMIZATION_REPORT.mdindex 2b24e96..101211e 100644--- a/sglang_omni/OPTIMIZATION_REPORT.md+++ b/sglang_omni/OPTIMIZATION_REPORT.md@@ -36,15 +36,16 @@ Two environment variables expose SGLang's existing `torch.compile` support:```textAUDIO8_TTS_ENABLE_TORCH_COMPILE=0|1-AUDIO8_TTS_TORCH_COMPILE_MAX_BS=4+AUDIO8_TTS_TORCH_COMPILE_MAX_BS=<optional positive integer>```-Compilation is disabled by default. When enabled, the adapter compiles batch-sizes up to 4 by default, covering the CUDA Graph batch sizes validated here-(`1`, `2`, and `4`). Set `AUDIO8_TTS_TORCH_COMPILE_MAX_BS` to tune the limit for-the expected concurrency and available memory. Larger batches continue through-SGLang's existing dynamic batching path. The first startup performs compilation-and kernel autotuning; later startups reuse `TORCHINDUCTOR_CACHE_DIR`.+Compilation is disabled by default. When enabled, the adapter preserves+SGLang's native compile batch-size policy instead of imposing an Audio8-specific+limit. `AUDIO8_TTS_TORCH_COMPILE_MAX_BS` is an optional override for deployments+that need to bound compilation time or memory use. Batches outside the compiled+set continue through SGLang's existing dynamic batching path. The first startup+performs compilation and kernel autotuning; later startups reuse+`TORCHINDUCTOR_CACHE_DIR`.### Optional static greedy path@@ -91,7 +92,6 @@ AUDIO8_TTS_MEM_FRACTION_STATIC=0.10 \AUDIO8_TTS_MAX_RUNNING_REQUESTS=4 \AUDIO8_TTS_ATTENTION_BACKEND=fa3 \AUDIO8_TTS_ENABLE_TORCH_COMPILE=1 \-AUDIO8_TTS_TORCH_COMPILE_MAX_BS=4 \AUDIO8_TTS_GREEDY_FASTPATH=0 \sglang_omni/scripts/run_server.sh```diff --git a/sglang_omni/adapter/sglang_omni/models/audio8_tts/factory.py b/sglang_omni/adapter/sglang_omni/models/audio8_tts/factory.pyindex 9eb3c97..4ab000a 100644--- a/sglang_omni/adapter/sglang_omni/models/audio8_tts/factory.py+++ b/sglang_omni/adapter/sglang_omni/models/audio8_tts/factory.py@@ -128,9 +128,9 @@ def make_server_args(model_path: str) -> Any:server_args.enable_torch_compile = (os.getenv("AUDIO8_TTS_ENABLE_TORCH_COMPILE", "0") == "1")- server_args.torch_compile_max_bs = int(- os.getenv("AUDIO8_TTS_TORCH_COMPILE_MAX_BS", "4")- )+ torch_compile_max_bs = os.getenv("AUDIO8_TTS_TORCH_COMPILE_MAX_BS")+ if torch_compile_max_bs is not None:+ server_args.torch_compile_max_bs = int(torch_compile_max_bs)attention_backend = os.getenv("AUDIO8_TTS_ATTENTION_BACKEND")if attention_backend:server_args.attention_backend = attention_backend