Phase 6: Replace REST polling with @gradio/client for generation and LoRA

- Add @gradio/client dependency for direct Gradio API communication
- Create gradio-client.ts: singleton client with lazy init and reconnection
- Rewrite acestep.ts: generation via /generation_wrapper (45 params), Python spawn fallback
- Remove REST polling code (submitToApi, pollApiResult, downloadAudioFromApi)
- Create lora.ts routes: load/unload/scale/toggle/status via Gradio events
- Register /api/lora routes in index.ts
This commit is contained in:
fspecii
2026-02-08 19:39:24 +02:00
parent 193cf707cd
commit f42fde9b40
6 changed files with 494 additions and 468 deletions
+1
View File
@@ -10,6 +10,7 @@
"storage:test": "tsx src/scripts/test-storage.ts"
},
"dependencies": {
"@gradio/client": "^2.0.4",
"@types/multer": "^2.0.0",
"better-sqlite3": "^11.0.0",
"cors": "^2.8.5",