Nodes/RedNode Studio/RedNode Free VRAM
ComfyUI Node

RedNode Free VRAM

The node that unloads your first model so the second one actually fits

By RedNodeAI·Created 2 months ago·Updated 2 days ago· 4
RedNode Free VRAM
  • value
  • keep
  • keep_2
  • value
unload_modelstrue
empty_cachetrue
always_runfalse
enabledtrue

If you've ever run a pipeline that loads a checkpoint, a detailer, and an upscaler in sequence, you know the exact failure this node exists for: the second big model loads, VRAM is already full, and ComfyUI either spills into system memory (an order of magnitude slower) or dies outright. RedNode Free VRAM is a deliberate, well-placed "unload everything here" that keeps the second model from ever competing with the first.

The design insight is subtle and it's the whole node. A node with no outputs that nobody uses might run at any time or not at all, so a bare "free memory" button can't promise it happens between two stages. This node takes any value on its value input - an image, a latent, a model, anything - and passes it straight through on the other side. That wire is the timing. By threading it through the data path, you force the free to happen at exactly the point in the chain you placed it, before the next heavy model loads. Nothing needs reloading by hand: the next sampler that needs a model just loads it, and the only cost is that load.

The widgets are the honest set: unload_models (default on) drops every model ComfyUI is holding; empty_cache (default on) hands the freed blocks back to the driver - leave it on, because unloading alone often leaves VRAM looking just as full; always_run forces the free even when nothing upstream changed, at the cost of the cache (everything downstream recomputes every queue); and enabled lets a Control Panel or Combo Control switch it, which bypassing the node can't do. The two optional inputs, keep and keep_2, leave a model resident - wire the one you're about to use again, say the CLIP or VAE you don't want to reload.

Where this pays off hardest is on cards that can't hold two big models at once - 8–12 GB territory. The pack's own guidance: on a 5090 the whole rig is fast enough that you rarely need it, but on mid-range cards a full chain (second pass, face detailer, 4K upscale) easily passes ninety seconds per image, and spilling to system RAM is what turns that into minutes. Freeing early beats letting ComfyUI evict late: eviction happens at the moment of the next load, when VRAM is fragmented and the allocation can still fail.

One honest limitation from the tooltips: models ComfyUI doesn't manage - SAM3, most upscalers - are never unloaded by this node in the first place. If your bottleneck is one of those, this isn't the lever. Also remember that freed models must reload on demand, so a node that frees aggressively in a loop can end up costing more in load time than it saves. Place it once, before the specific second model, and it earns its keep.

Installation is just the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/RedNodeAI/ComfyUI-RedNodeStudio.git

or search RedNode Studio in ComfyUI Manager, then restart. No pip dependencies, works with any model - this is general-purpose plumbing, nothing Krea-specific about it.

CategoryRedNode/Control

Inputs (7)

NameTypeDefaultDescription
value*anything — it comes out untouched. Wiring it through is what fixes WHEN the memory is freed.
unload_modelsBOOLEANtrueunload every model ComfyUI is holding. They reload on demand, so the cost is load time, not the run.
empty_cacheBOOLEANtruehand the freed blocks back to the driver. Leave on: unloading alone often leaves VRAM looking just as full.
always_runBOOLEANfalsefree even when nothing upstream changed. Costs you the cache: everything downstream recomputes every queue.
enabledBOOLEANtrueoff means pass straight through and free nothing. Here so a Control Panel or Combo Control can switch it, which bypassing the node cannot do.
keepopt*a model to leave resident — wire the one you are about to use again. LoRA-patched clones count as the same model. Models ComfyUI does not manage (SAM3, most upscalers) are never unloaded by this node in the first place.
keep_2opt*a second model to leave resident, for a checkpoint and its CLIP or VAE.

Outputs (1)

NameTypeDescription
value*