fix: HF-Cache zurueck + Banner-Bug + config_request Pattern
Vier Bugs in einem Aufwasch: 1. HF-Cache als Bind-Mount zurueck xtts/hf-cache:/root/.cache/huggingface fuer beide Bridges. War vorher raus, dadurch jedes Container-Restart = ~3GB Whisper-Download + ~1GB F5-TTS-Download. User dachte 5min ist einmalig — ist aber bei jedem Restart. Jetzt: einmal pro Maschine geladen, fertig. 2. Banner zeigte stale "ready" whisper-bridge sendete beim Connect nur dann Status wenn Modell schon geladen war. Sonst blieb der App/Diagnostic Banner auf dem alten "ready" State von vor dem Restart haengen — User sah "bereit" obwohl gerade gar nichts geladen war. Jetzt wird IMMER ein Status broadcast: ready oder loading. 3. config_request Pattern aria-bridge wusste nicht wann Gamebox-Bridges sich (re)connecten. Wenn die nach aria-bridge kamen, verpassten sie den Config-Broadcast und blieben mit Hard-Defaults stehen. Jetzt: whisper- und f5tts-bridge senden beim Connect ein config_request, aria-bridge antwortet mit der persistierten Config (whisperModel, xttsVoice, f5tts*-Felder). 4. RVS ALLOWED_TYPES um config_request erweitert. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+12
-9
@@ -615,20 +615,23 @@ async def run_loop(runner: F5Runner) -> None:
|
||||
# Status-Broadcast: erst loading, dann ready nach erfolgreichem Load.
|
||||
# Modell wird hier (nicht ausserhalb der Schleife) gestartet damit
|
||||
# der Loading-Status auch wirklich uebertragen werden kann.
|
||||
# Plus: config_request damit wir die persistierte Diagnostic-Config
|
||||
# bekommen, falls aria-bridge ihre nicht von alleine sendet.
|
||||
async def _load_with_status():
|
||||
if runner.model is not None:
|
||||
await _broadcast_status(ws, "ready",
|
||||
model=runner.model_id,
|
||||
loadSeconds=runner.last_load_seconds)
|
||||
return
|
||||
await _broadcast_status(ws, "loading", model=runner.model_id)
|
||||
try:
|
||||
await runner.ensure_loaded()
|
||||
await _broadcast_status(ws, "ready",
|
||||
model=runner.model_id,
|
||||
loadSeconds=runner.last_load_seconds)
|
||||
except Exception as e:
|
||||
await _broadcast_status(ws, "error", error=str(e)[:200])
|
||||
else:
|
||||
await _broadcast_status(ws, "loading", model=runner.model_id)
|
||||
try:
|
||||
await runner.ensure_loaded()
|
||||
await _broadcast_status(ws, "ready",
|
||||
model=runner.model_id,
|
||||
loadSeconds=runner.last_load_seconds)
|
||||
except Exception as e:
|
||||
await _broadcast_status(ws, "error", error=str(e)[:200])
|
||||
await _send(ws, "config_request", {"service": "f5tts"})
|
||||
asyncio.create_task(_load_with_status())
|
||||
|
||||
# TTS-Worker fuer diese Verbindung starten
|
||||
|
||||
Reference in New Issue
Block a user