diff options
| author | historia <historiavg@proton.me> | 2026-09-02 01:26:09 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-09-02 01:26:09 -0400 |
| commit | 8579517a35ef1865fc9b428899d73d52dcb27a14 (patch) | |
| tree | dba52f8d99cfe4014e0b787367de99f238e5a0db /app/backends/sglomni/__init__.py | |
| parent | 391f50da7a085bec75155c0eb9b47910266058cc (diff) | |
| download | tts-audiobook-generator-8579517a35ef1865fc9b428899d73d52dcb27a14.tar.gz | |
feat: sglang backend support
Diffstat (limited to 'app/backends/sglomni/__init__.py')
| -rw-r--r-- | app/backends/sglomni/__init__.py | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/app/backends/sglomni/__init__.py b/app/backends/sglomni/__init__.py new file mode 100644 index 0000000..688e488 --- /dev/null +++ b/app/backends/sglomni/__init__.py @@ -0,0 +1,98 @@ +"""sglang-omni backend — setup wizard, server specs, model management. + +A package of focused modules behind one import surface: everything public +is re-exported here, so callers (the hub, the CLI, tests) keep using +``backends.sglomni.<name>`` regardless of which module implements it. + +Modules: + constants shared constants (package name, port, timeouts, configs) + catalog the model catalog + the install tree shape + gpu the NVIDIA GPU facts (nvidia-smi) launch decisions use + pythonenv interpreter selection/provisioning for the backend venv + models model install state, (un)install, run-model resolution + status detect() for the hub's backend menu + the server spec + wizard the TUI wizard, configure screen, uninstall/update, CLI +""" + +from .constants import ( + CONFIGS_DIR, + DEFAULT_PORT, + PYTHON_SPEC, + PYTHON_VERSIONS, + SERVER_NAME, + SERVER_START_TIMEOUT, + SGLOMNI_PIP_PKG, + UV_PIP_PKG, +) +from .gpu import ( + compute_capability, + describe, +) +from .catalog import ( + CAPABILITY_CLONE, + CAPABILITY_DESIGN, + CAPABILITY_SPEAKER, + ENTRIES, + ModelEntry, + config_path, + entries_by_keys, + entry_by_key, + entry_by_repo, + install_tree_families, +) +from .pythonenv import ( + env_compatible, + env_version, + prepare_env, +) +from .models import ( + delete_model_weights, + install_model, + installed_entries, + installed_keys, + model_installed, + preset_voices, + repo_dir, + resolve_model, + uninstall_model, +) +from .status import ( + build_spec, + detect, + gpu_fallback_note, + launch_config_path, + needs_fp8_fallback, +) +from .wizard import ( + build_parser, + main, + models_screen, + run_tui, + setup_screen, + uninstall, + update, +) + +__all__ = [ + # constants + "CONFIGS_DIR", "DEFAULT_PORT", "PYTHON_SPEC", "PYTHON_VERSIONS", + "SERVER_NAME", "SERVER_START_TIMEOUT", "SGLOMNI_PIP_PKG", "UV_PIP_PKG", + # gpu + "compute_capability", "describe", + # catalog + "CAPABILITY_CLONE", "CAPABILITY_DESIGN", "CAPABILITY_SPEAKER", + "ENTRIES", "ModelEntry", "config_path", "entries_by_keys", + "entry_by_key", "entry_by_repo", "install_tree_families", + # pythonenv + "env_compatible", "env_version", "prepare_env", + # models + "delete_model_weights", "install_model", "installed_entries", + "installed_keys", "model_installed", "preset_voices", "repo_dir", + "resolve_model", "uninstall_model", + # status + "build_spec", "detect", "gpu_fallback_note", "launch_config_path", + "needs_fp8_fallback", + # wizard + "build_parser", "main", "models_screen", "run_tui", "setup_screen", + "uninstall", "update", +] |
