docs: #1186 Entwurf für das Studio-Issue (GPU-Cache nach Entladen)

Text vom Nexus-Modell qwen38-iq3s, von Claude gegen den Testbericht geprüft.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 06:31:50 +01:00
parent 14e7d1ddb3
commit eb6765fd47
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,32 @@
# Entwurf: Issue für hangry-labs/faster-qwen3-tts-studio (NICHT abgeschickt)
Status: Entwurf, Stand 22.11.2026 (→ #1186). Abschicken macht der Mensch selbst, über den Issue-Tracker des Repositorys. Der Text wurde vom lokalen Nexus-Modell `qwen38-iq3s` entworfen (Antwort von Nexus) und von Claude gegen den Testbericht `testberichte/2026-11-21-engine2betrieb.6-srv04-testinstanz.md` geprüft: Zahlen und Aussagen stimmen. Vor dem Abschicken: persönliche Angaben und Netzadressen des LAN prüfen.
**Titel:** GPU memory retained after `POST /studio/models/unload`, not visible as free to other processes
**Text:**
When a model is unloaded via `POST /studio/models/unload`, the unload is reported correctly: `GET /studio/status` shows the model as unloaded, and `torch.cuda.memory_allocated()` drops back to the base-model value (4334 MiB).
The memory as seen from outside the process does not drop back. Measured with `nvidia-smi` over three load/unload cycles of the CustomVoice model on an RTX 3060 (12 GB):
| State | Device memory used |
| --- | --- |
| before cycling | 4569 MiB |
| cycle 1 | 8259 MiB |
| cycle 2 | 8301 MiB |
| cycle 3 | 8343 MiB |
After unloading, the value stays at that level. `torch.cuda.memory_reserved()` is 8058 MiB, i.e. the freed blocks are held by PyTorch's caching allocator rather than returned to the driver. Other programs on the same GPU therefore do not see this memory as available.
Suggestion 1: call `torch.cuda.empty_cache()` after unloading a model.
Suggestion 2: in addition to the allocated amount, report the memory actually available for use (for example reserved/free) in `GET /studio/status`, so the difference between allocated and usable is visible.
Is this behaviour intended, and is there a setting for it?
## Hinweise zum Abschicken
- Keine Tokens, keine Zugangsdaten, keine Stimmaufnahmen angeben.
- Die LAN-Adresse des Servers nicht nennen.
- Ton beim Abschicken prüfen: sachlich, ohne Vorwürfe.
- Die Zahlen stammen von einer Testinstanz (Version `0.1.15-rc27`) mit Studio-Image `hangrylabs/faster-qwen3-tts-studio`; die Revision steht im Entwurf `studio-issue-installiert.md`.