feat(flux): HF-Token in Diagnostic statt .env

Passwort-Feld in der FLUX-Section, mit Show/Hide-Toggle und kurzem
Hinweis-Link zu den HuggingFace-Schritten (Lizenz-Agree + Token-Erzeugung).
Wert wird in voice_config.json persistiert und per config-Broadcast an
die flux-bridge gepusht; dort vor jedem from_pretrained als HF_TOKEN +
HUGGING_FACE_HUB_TOKEN env gesetzt.

HF_TOKEN aus .env.example + docker-compose.yml entfernt. Auch FLUX_MODEL
aus compose raus — Default-Modell kommt jetzt komplett aus Diagnostic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-16 23:25:55 +02:00
parent 0407c5bc3c
commit afa96b1d44
6 changed files with 54 additions and 28 deletions
+8
View File
@@ -1957,6 +1957,14 @@ wss.on("connection", (ws) => {
if (msg.fluxKeywordSwitch !== undefined) {
voiceConfig.fluxKeywordSwitch = String(msg.fluxKeywordSwitch || "").trim().toLowerCase() || "fix";
}
// HuggingFace-Token fuer gated FLUX.1-dev. Wird per RVS an die
// flux-bridge gepusht, dort als HF_TOKEN env gesetzt vor dem
// naechsten from_pretrained. Leerer String = "kein Token" (statt
// 'behalt was du hattest'), damit Stefan ihn auch wieder loeschen
// kann.
if (msg.huggingfaceToken !== undefined) {
voiceConfig.huggingfaceToken = String(msg.huggingfaceToken || "").trim();
}
try {
fs.mkdirSync("/shared/config", { recursive: true });
fs.writeFileSync("/shared/config/voice_config.json", JSON.stringify(voiceConfig, null, 2));