Nodes/IndexTTS 2 / 2.5/IndexTTS 2 / 2.5 Unload Model
ComfyUI Node

IndexTTS 2 / 2.5 Unload Model

The polite way to get your VRAM back

By joyfoxai·Created about a month ago·Updated 25 days ago· 1
IndexTTS 2 / 2.5 Unload Model
    • status
    unloadtrue

    Here's the thing nobody tells you about the joyfoxai/ComfyUI-Index-TTS-25 pack: once the Model Loader loads a model, it stays in VRAM. Run a batch of synthesis, then jump back to image or video work, and the IndexTTS weights are still sitting there eating memory you'd rather spend on pixels. This node is the "get out of my VRAM, please" button.

    IndexTTS 2 / 2.5 Unload Model is the smallest node in the pack - one input, one output, no model involved - and that's the whole point. TTS is cheap to load and cheap to run, but it's not free to keep around, and this is the cleanup step the other two nodes don't give you.

    Why you need it (and why sometimes you don't)

    The Loader caches one model process-wide, keyed by model + settings, and it auto-unloads whenever you change those settings - switch from IndexTTS-2 to 2.5, or bf16 to fp32, and the old copy is freed automatically. So you only reach for Unload in two situations:

    • You're done with TTS for a while and want the VRAM back for the next job - e.g. you made your voiceover, now you're rendering video on the same card.
    • You want to force a clean reload next queue because a session has been up a long time and you suspect a leaky or half-broken state.

    One subtlety: because the cache is global, one Unload node frees the model for the entire graph, even if several Loader/Synthesize pairs are sharing it. That's a feature - you don't need one Unload per branch.

    What it does

    Flip unload (a BOOLEAN, default true) and the node clears the cached model: it moves the GPT component back to CPU, deletes the model object, runs a garbage collect, and calls both torch.cuda.empty_cache() and ComfyUI's soft_empty_cache() to hand the memory back to the pool. If you set unload to false (or wire it to a Boolean that's off), it just reports that the model is kept loaded.

    Inputs and output

    • unload - the only input. true frees the model, false leaves it alone. That's the whole API, and honestly it's refreshing.
    • status - a STRING output that says either IndexTTS 2/2.5 model unloaded or IndexTTS 2/2.5 model kept loaded. Pipe it into a text display or a workflow logger if you want to confirm the cleanup actually ran.

    Where to put it

    Place it at the end of your TTS workflow - after the last Synthesize, at a point that runs once you're done generating. A common pattern: run the synthesis branch, generate your audio, then hit Unload before the graph moves on to the video section. What you don't want is Unload sitting between the Loader and Synthesize in the same run - that would unload the model your Synthesize is about to use, and the Loader would just reload it, which is strictly slower and pointless.

    Install

    It's part of the pack, so the install is shared with the other two nodes. Clone, install requirements into ComfyUI's Python, download models, restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/joyfoxai/ComfyUI-Index-TTS-25.git
    cd ComfyUI
    python -m pip install -r custom_nodes/ComfyUI-Index-TTS-25/requirements.txt
    cd custom_nodes/ComfyUI-Index-TTS-25
    ./download_models.sh all
    

    You'll find it under right-click → audio → IndexTTS, alongside the Model Loader and Synthesize.

    That's it. It's a utility node, it does one job, and it does it without ceremony - which, if you've ever watched your card's VRAM meter while juggling a voice model and a video model, is exactly the ceremony you want.

    Categoryaudio/IndexTTS

    Inputs (1)

    NameTypeDefaultDescription
    unloadBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    statusSTRING