Nodes/comfyui_voicebridge/VoiceBridge Unload Model
ComfyUI Node

VoiceBridge Unload Model

The VRAM janitor this pack quietly depends on

By YanTianlong-01·Created 7 months ago·Updated 2 months ago· 11
VoiceBridge Unload Model
  • anything
  • any
Unload_ASR_Modeltrue
Unload_TTS_Modeltrue

Here's the thing nobody tells you about VoiceBridge's two loaders: the models they load stay in VRAM until something kicks them out. Load Qwen3-ASR 1.7B, run your transcription, and it's still sitting there when you go to load Qwen3-TTS 1.7B for the synthesis step - on an 8–12GB card, that's a crowd. This node is the eject button. Run it when a stage is done and the model's cache is freed, no restart required.

How it works

It's a pass-through node with a side effect. The anything input accepts any type and is forwarded unchanged to the any output - so you wire it into your graph wherever execution order matters, and whatever value flows through comes out the other side. The actual work happens between: when the node runs, it unloads the cached ASR model, the cached TTS model, or both, and calls ComfyUI's soft cache clear to hand the VRAM back.

Two toggles decide what gets freed:

  • Unload_ASR_Model (default True) - clears the Qwen3-ASR cache.
  • Unload_TTS_Model (default True) - clears the Qwen3-TTS cache.

The clever bit is behind the scenes: every unload bumps an internal counter, and the loaders' change-detection watches that counter. So if you unload the TTS model and then re-run the graph, the VoiceBridge TTS Loader knows it needs to reload rather than silently reusing a dead handle. Unload-then-reload is safe by design - that's the part that makes this node usable in an actual workflow instead of a footgun.

How to wire it

The intended pattern is: put it after the last node whose output you want to keep, and connect that output to anything so the unload happens at the right moment. Concretely, a chained ASR → TTS workflow looks like:

  1. VoiceBridge ASR LoaderVoiceBridge ASR Transcribe → (grab the transcript)
  2. VoiceBridge Unload Model with Unload_ASR_Model on, Unload_TTS_Model off - wire something from the transcription stage into anything so it runs after step 1.
  3. VoiceBridge TTS LoaderVoice Clone Prompt / SRT To Audio.

The pass-through means the unload can be slotted anywhere without breaking the data flow - that's the whole point of the anything/any plumbing. It uses the same wildcard-type trick (AnyType) that ComfyUI's core utility nodes use, so it connects to anything.

Installing it

Part of the comfyui_voicebridge pack. ComfyUI Manager search "VoiceBridge", or:

cd ComfyUI/custom_nodes
git clone https://github.com/YanTianlong-01/comfyui_voicebridge.git
cd comfyui_voicebridge
pip install -r requirements.txt

Restart ComfyUI. No models, no downloads - it's pure memory management.

When you actually need it

If you're on a 16GB+ card and only ever run one side of the pipeline at a time, you can skip it - ComfyUI's own model management will mostly cope. But the moment you chain ASR and TTS in one run, or you switch between the two models repeatedly, this node is the difference between a smooth render and an out-of-memory crash mid-pipeline. It's the least glamorous node in the pack and the one you'll be glad exists on the first long render.

CategoryVoiceBridge

Inputs (3)

NameTypeDefaultDescription
anything*
Unload_ASR_ModelBOOLEANtrue
Unload_TTS_ModelBOOLEANtrue

Outputs (1)

NameTypeDescription
any*