- Preserve backend device placement through the IndexTTS wrapper handler.
- Release accelerated GPT weights, KV caches, and CUDA graphs before device
or dtype changes, then rebuild acceleration when generation resumes.
- Reuse a capture stream on each GPU to avoid accumulating CUDA workspaces.
- Restore mocked ComfyUI user-directory APIs for Fish Audio unit tests.
Validation:
- 168 unit tests passed.
- Live IndexTTS-2 low-VRAM generation, unload, and generation passed.
- CUDA capture, replay, cleanup, and rebuild checks passed with lightweight
models on both GPUs. Full FlashAttention speech was not exercised.