UnloadAllModels
Unload All Models
- value
- *
Unload All Models is the blunt instrument in this two-node pack. Where its sibling, Unload Model, evicts one specific model you point it at, this one clears the whole board - everything ComfyUI currently has loaded gets kicked out of VRAM at the step you place it. No picking, no targeting. Just "dump it all, right here."
That bluntness is the point, and it's also the reason to be a little careful with it. Reach for it when you want a clean slate mid-workflow: at the tail end of a run before a big second stage kicks in, or when you're switching hard between models and you'd rather start the next chunk with an empty tank than trust the automatic manager to make room in time.
Worth repeating up front, because the author says it too: ComfyUI already handles memory on its own, and for most workflows that's plenty. This node - like the whole pack - is for manual memory management, the cases where the built-in behavior leaves you short. The tell that you might want it is generations slowing down after the first batch as models accumulate. If you're not hitting that, you can skip it.
Why it exists next to Unload Model
The two nodes split along one axis: precision versus scope. Unload Model is the scalpel - great for the Flux pattern where you free just the T5-XXL text encoder after it's done encoding, so the sampler gets that VRAM back while the diffusion model keeps running. Modern encoders are big enough that this alone can decide whether a workflow fits your card.
Unload All Models is the sledgehammer. You use it when you don't want to enumerate what's loaded, you just want it gone. That's cleaner at a genuine boundary - the end of a stage, a full model swap - and needlessly aggressive in the middle of one, since anything you unload gets reloaded from disk the next time the graph needs it, and that reload costs seconds. Use the scalpel inside a stage; save the sledgehammer for the seams between them.
How it works
Like the whole pack, it's a passthrough node. It doesn't sit off to the side with a button - it lives inline on a wire. Whatever you feed it comes straight back out, and the unload happens as a side effect when execution reaches the node. All the actual freeing is done by ComfyUI's own memory management, which is why the pack is tiny, has no dependencies, and downloads nothing.
The one input and the output
This node is deliberately simple. There's a single input:
value- pure passthrough. Plug in whatever the workflow is carrying at that point (a latent, an image, conditioning - anything), and it comes back out the output unchanged. Its only job is to put the node on the execution path so the unload actually fires.
Notice there's no model input. That's the whole difference from Unload Model: you're not naming a target, so there's nothing to connect. The single output is the same value you passed in, which you route onward to wherever it was already going.
Installing it
Through ComfyUI Manager, open the custom-nodes panel and search the pack title, ComfyUI-Unload-Model - both nodes ship together, so installing the pack gets you this one and Unload Model at once. Or clone it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/SeanScripts/ComfyUI-Unload-Model.git
Restart the ComfyUI server afterward. Nothing to download, no weighty dependencies.
Where people get tripped up
The passthrough design has one recurring trap: the node only fires if its output is wired into something that eventually reaches an output node. ComfyUI walks backward from your Save/Preview nodes and runs only what feeds them, so a node hanging off to the side is silently skipped - no error, no unload, nothing. If you drop this in and memory doesn't budge, the first thing to check is whether its output is actually threaded into your live graph, standing in for the wire it replaced.
The author flags the nodes as experimental, and the known sore spot is GGUF: loader changes have at times left GGUF-quantized models still resident after an unload call. It may be fixed by now, but if you're on a GGUF checkpoint or encoder and VRAM stays pinned, suspect that first.
And if all you want is to clear memory between runs rather than at a chosen point inside one, you don't need this - ComfyUI Manager has an unload button for exactly that. Unload All Models earns its keep specifically when the clear has to happen at a precise spot in a single execution.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |