⚜️ Model Unloader
Force a VRAM flush between stages so 12GB cards keep up
- any_type
- model_to_unload
- passthrough
ComfyUI doesn't proactively free VRAM between stages of a workflow. If your graph swaps checkpoints mid-generation - exactly what this pack's signature two-stage SDXL setup does - you can end up with two checkpoints' worth of weights fighting for the same card at once. The README says it plainly: "Comfy does not like it when your dedicated VRAM maxes out, and it does not manage it sufficiently on its own. This node is a noticable speed boost for my RTX 4080 (16GB)." The pack's workflow notes go further: this node is what makes the two-stage setup runnable on 12GB cards at all, and 18GB+ users can just disable it to shave a few seconds.
That 12GB figure isn't arbitrary - SDXL comfortably fits in 12GB on its own. It's running two checkpoints back to back in one graph, without anything freeing the first, that pushes a 12GB card past its limit.
How it works
This isn't a data-transform node - it's a sequencing trick. any_type (required, wildcard-typed *) is a passthrough: you route something genuinely part of your data flow through it - a latent, an image, whatever sits between your two stages - purely so ComfyUI's execution scheduler is forced to run this node, and therefore the unload, at exactly that point in the graph. model_to_unload (optional, also *-typed) is where you connect the actual MODEL, CLIP, or VAE reference you want evicted before the next stage loads its own. enable (default true) is the on/off switch the README mentions for higher-VRAM cards. Output is passthrough - whatever you fed any_type comes back unchanged, so your real data keeps flowing downstream without a dead end.
The wildcard * typing is deliberate: this node is built to slot into your execution order regardless of what kind of data happens to be flowing at that point, because sequencing - not data transformation - is the whole job.
Installing it
Via ComfyUI Manager: search Comfyui FOCUS nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/DJ-Tribefull/Comfyui_FOCUS_nodes
Restart ComfyUI. No models, no extra dependencies - it operates on whatever's already loaded in your session.
Common issues & troubleshooting
VRAM still climbs across stages even with this node in the graph. Two likely causes: model_to_unload isn't actually connected (the node still executes as a scheduling barrier with nothing plugged in, but frees nothing if you didn't wire a model into that specific socket), or the any_type passthrough isn't genuinely load-bearing. If you connect any_type to something off to the side rather than routing real data through it, ComfyUI's scheduler isn't guaranteed to execute this node exactly when you expect - the unload can land too early or too late relative to your second stage.
You're on 16GB+ and don't need this at all. Per the README's own guidance, disable it (the enable widget) rather than removing it - you save a few seconds of generation time and can flip it back on if you ever push a heavier stack through the same graph.
You've got well under 10GB of VRAM. This node reduces peak usage, it doesn't work miracles - one report from the pack's own community suggested that cards under roughly 10GB are better served by a hosted service than by trying to squeeze a two-checkpoint SDXL workflow locally, even with unloading in place.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| any_type | * | — | |
| enable | BOOLEAN | true | — |
| model_to_unloadopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| passthrough | * | — |