From d46eb5bcc619f92c75cfacc0f631d5fcb1c00a00 Mon Sep 17 00:00:00 2001 From: James Pine Date: Thu, 12 Mar 2026 09:52:30 -0700 Subject: [PATCH 1/7] feat: add LuxTTS as second TTS engine with multi-engine support Introduce LuxTTS (ZipVoice) alongside Qwen TTS, enabling users to choose between engines at generation time. LuxTTS offers fast, English-focused voice cloning at 48kHz with ~1GB VRAM. Backend: - Add LuxTTSBackend with encode_prompt/generate_speech integration - Multi-engine registry (get_tts_backend_for_engine) replacing singleton - Engine-prefixed voice prompt cache keys to avoid collisions - Engine field on GenerationRequest (default 'qwen' for backward compat) - Engine dispatch in /generate and /generate/stream endpoints - LuxTTS in model status, download, and delete maps Frontend: - TTS Engine selector dropdown in GenerationForm (Qwen TTS / LuxTTS) - Conditionally hide Model Size and Delivery Instructions for LuxTTS - Engine field added to TypeScript types and Zod schema - LuxTTS section in Model Management page --- .../components/Generation/GenerationForm.tsx | 123 ++++---- .../ServerSettings/ModelManagement.tsx | 95 +++++-- app/src/lib/api/types.ts | 2 + app/src/lib/hooks/useGenerationForm.ts | 17 +- backend/backends/__init__.py | 45 ++- backend/backends/luxtts_backend.py | 264 ++++++++++++++++++ backend/main.py | 142 +++++++--- backend/models.py | 1 + backend/profiles.py | 6 +- backend/requirements.txt | 10 +- 10 files changed, 584 insertions(+), 121 deletions(-) create mode 100644 backend/backends/luxtts_backend.py diff --git a/app/src/components/Generation/GenerationForm.tsx b/app/src/components/Generation/GenerationForm.tsx index 31b100f8..2d9412f0 100644 --- a/app/src/components/Generation/GenerationForm.tsx +++ b/app/src/components/Generation/GenerationForm.tsx @@ -76,29 +76,56 @@ export function GenerationForm() { )} /> - ( - - Delivery Instructions (optional) - -