blob: 945ce8a7ddef1fc80bcb0c73d5338e8115e6834a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
"""Shared constants for the sglang-omni backend."""
from pathlib import Path
# The pip package providing the `sgl-omni` server CLI. Installed unpinned
# (like qwen-tts and faster-qwen3-tts) so the update action can move with
# upstream releases; the stack this code was verified against is 0.1.4.
SGLOMNI_PIP_PKG = "sglang-omni"
# The dedicated venv is backends.envs.SGLOMNI_ENV_DIR (imported from there
# by the modules that need it) — its interpreter may differ from the
# launching Python's, see pythonenv.prepare_env.
# The vendored copies of upstream examples/configs/*.yaml (the `sgl-omni
# serve --config` argument). ZONOS2 is the one catalog model without a
# config (it runs from --model-path alone, with a GPU-conditional bf16
# fallback config in its catalog entry).
CONFIGS_DIR = Path(__file__).resolve().parent / "configs"
# The managed server's port when the configured URL names none.
DEFAULT_PORT = 8100
# The ServerSpec name (pid/log files: app/logs/sglomni-server.*).
SERVER_NAME = "sglomni"
# The managed server boots a multi-stage pipeline (preprocessing, TTS
# generation, vocoder) and may pull companion weights on first start, so
# its spec overrides the shared 600 s start timeout.
SERVER_START_TIMEOUT = 1200
# Python interpreters the sglang-omni stack accepts (requires-python
# ">=3.10,<3.13"), newest first — the search order for both the
# compatible-interpreter scan and the uv fallback.
PYTHON_VERSIONS = ((3, 12), (3, 11), (3, 10))
PYTHON_SPEC = "3.12"
|