Index TTS 2 - Cache Control
The switch between low VRAM and fast repeat generations
- cache_control
IndexTTS-2's model stack is heavy - a base TTS model, an emotion classifier, a semantic codec, a speaker-embedding model, and a vocoder, all loaded together. By default, this pack unloads all of that and clears CUDA's cache the moment a generation finishes, specifically to keep VRAM usage low between runs. Good for a 12GB card running day-to-day, bad if you're iterating on the same voice and settings and don't want to eat a full reload every single time. This one-input node is the switch between those two behaviors, and it doesn't do anything on its own - it produces a small settings packet you wire into one or more of the other TTS2 nodes.
How it works
The node itself just outputs a DICT - {"keep_cached": true/false} - through its cache_control output. That output is meant to plug into the optional cache_control input available on Index TTS 2 - Base, Emotion Audio, Emotion Vector, Emotion Text, and Index TTS 2 Pro. You can wire the same Cache Control node into several of those at once if your graph uses more than one.
With keep_models_cached off (the default, and what you get if you never add this node at all): every generation unloads the TTS2 weights and clears CUDA memory afterward. Lower peak VRAM, but each run pays a reload cost. With it on: weights stay resident in VRAM after a run, so back-to-back generations are noticeably faster - at the cost of holding onto that VRAM the whole time, even while you're not generating.
Inputs and outputs that matter
There's exactly one input: keep_models_cached (BOOLEAN, default false). One output: cache_control (DICT), which you connect to the cache_control slot on whichever TTS2 node(s) you're driving.
Install
ComfyUI Manager: search ComfyUI-Index-TTS, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/chenpipi0807/ComfyUI-Index-TTS.git
cd ComfyUI-Index-TTS
pip install -r requirements.txt
No model download for this node itself - it's pure control-flow, a settings dict. You only need it, and it only does anything, once you're already running one of the IndexTTS-2 generation nodes with their full model stack downloaded.
Where people get burned
The obvious one: if you're on a 12GB card and forget this node exists, every generation unloads and reloads TTS2's full stack, which is exactly the intended safe default but feels needlessly slow once you're doing ten iterations on the same voice in a row - that's the moment to add this node and flip it on. The less obvious one is forgetting to flip it back off: leaving keep_models_cached on for a long session means IndexTTS-2's weights sit in VRAM the whole time, which can starve other nodes in the same workflow (an LLM node, an image model, anything else sharing the GPU) of memory they'd normally have. The pack's own advice is to treat this as a temporary toggle for parameter-tuning sessions - turn it on while you're dialing in settings on the same voice, then turn it back off (or just remove the wire) once you're done, rather than leaving it permanently connected.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| keep_models_cached | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cache_control | DICT | — |