Nodes/ComfyUI-Index-TTS/Index TTS 2.5 - Cache Control
ComfyUI Node

Index TTS 2.5 - Cache Control

The boring Cache Control node that stops your TTS workflow from OOMing

By chenpipi0807·Created about a year ago·Updated 6 days ago· 751
Index TTS 2.5 - Cache Control
    • cache_control
    keep_models_cachedfalse

    This one's about as exciting as a utility bill, which is exactly why you should care about it. Index TTS 2.5 - Cache Control is a tiny node that decides what happens to the TTS model weights after a generation finishes. It's the difference between a workflow that runs comfortably on a 12GB card and one that OOMs mid-sentence on a big batch.

    How it works

    Every other 2.5 node in the pack (Base, Emotion Audio, Emotion Text, Emotion Vector) has an optional cache_control input expecting a DICT. This node builds that dict. It has exactly one boolean, keep_models_cached, defaulting to false, and one output, cache_control, containing {"keep_cached": ...}.

    • False (default): after each run the pack unloads the TTS model and clears CUDA cache. Slower if you're generating repeatedly, but VRAM stays low - the pack's own framing is that this is the right setting for daily use on a 12GB card.
    • True: weights stay resident, so consecutive generations are faster - no reload-and-infer cycle each time. The tradeoff is higher VRAM for as long as the models sit loaded.

    The source does this defensively: if the input is missing or empty, it treats it as "don't keep cached" and unloads. Nothing crashes, you just don't get the retention benefit.

    How to use it

    Wire it up like this: Cache Controlcache_control on your Base or emotion node. That's the whole graph change. My advice: leave it off by default and only flip it on while you're batch-testing parameters - the reload cost is what makes sweeping sliders through twenty generations feel glacial. When you're done tuning, turn it back off so you don't leave a few GB of weights parked in VRAM that the next thing in your workflow would rather use.

    There's a subtle gotcha worth knowing: if you've got a single Base node and you're doing one-off renders, Cache Control buys you nothing - the node would unload anyway once the graph finishes. It shines when a graph runs the TTS node repeatedly, or when you're iterating on settings.

    Install and requirements

    It ships in the same pack as the rest of the 2.5 nodes, so install is identical: ComfyUI Manager (search "ComfyUI-Index-TTS") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chenpipi0807/ComfyUI-Index-TTS
    cd ComfyUI-Index-TTS && pip install -r requirements.txt
    

    It doesn't load any model of its own and needs nothing beyond the pack's regular dependencies. The models (all into ComfyUI/models/IndexTTS-2.5/) are required by whatever 2.5 node you're actually running - the download script TTS2_5_download.py handles them in one go. It's a genuinely thin utility node, and that's fine; sometimes the most useful node in a workflow is the one that politely puts the toys away when you're done.

    Categoryaudio

    Inputs (1)

    NameTypeDefaultDescription
    keep_models_cachedBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    cache_controlDICT