Nougan Refresh Page π
The node that frees your VRAM mid-graph β and how to wire it so it doesn't backfire
Sooner or later a workflow stops fitting. You've got a video model loaded, you want to VAE-decode a batch, and ComfyUI decides to move the model to system RAM and back while you watch the fans. Or you've switched models between two stages and the old one is still squatting on 20GB.
Nougan Refresh Page π is the blunt instrument for that. It's a pass-through - anything in, the same thing out - that unloads models and drops caches every time it executes. Wire it inline where you want the memory freed, and ComfyUI stops guessing.
What it actually does
Three levels of cleanliness, controlled by the node's own toggles (visible in its UI, and saved with the workflow):
- Unload models from the GPU, then release the CUDA allocator cache. The aggressive one. After this, the next node that needs a model reloads it from disk.
- Cache-only clean - Python garbage collection plus releasing the allocator cache, keeping models loaded. Good for wringing out fragmentation between stages without paying reload costs.
- Drop ComfyUI's cached node outputs once the run finishes. Frees system RAM; makes every repeat run recompute everything. Off by default for a reason.
There's also a kernel-backend preference (CUDA / Triton / eager / auto) for comfy-kitchen-style kernel selection, which is the sort of setting you touch once when you suspect a backend is misbehaving and then never again.
On the UI side there's a live VRAM gauge and Reload / Refresh / Clean-now buttons that talk to a small HTTP route. That's the "Refresh Page" in the name: when you're iterating and ComfyUI's frontend has gone stale or wedged, the node gives you a button that doesn't involve Ctrl+F5 and hoping the queue survives.
It's marked as an output node and never cached, so it runs on every queue even when nothing is wired to its output. That's deliberate: a cleaner that doesn't run is a cleaner you don't have.
Wiring it properly
The rule is simple and mostly ignored: put it where you want the memory gone.
VAE Decode βββΊ [image] Nougan Refresh Page βββΊ Save/Preview
That's the useful pattern for image work - decode, free, then let the next stage have the card. Between two sampler stages is the other good spot.
The bad pattern:
MODEL βββΊ Nougan Refresh Page βββΊ KSampler
Because the node unloads everything each time it executes, this hands the sampler a model reference and then evicts it, so ComfyUI reloads the model it just passed. You've built a speed bump. The docs say this plainly, and it's still the most common way people use it.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/Nougan_Nodes
# restart ComfyUI
Or ComfyUI Manager β "Nougan". Nothing to pip install. It uses ComfyUI's own model-management internals, so it needs a reasonably current build; if it fails to load, the rest of the pack still works - each family imports inside its own try/except. Hard-refresh after restart to get the gauge and buttons.
When it actually helps, and when it doesn't
It helps with model-transition bloat: two architectures in one graph, one of them unnecessarily resident. And with decode-time memory: a video VAE decode that needs headroom right after the sampler is done with the DiT.
It doesn't help with a clip that's simply too big. The KB's numbers are worth remembering: video is genuinely GPU-tier-dependent where image generation mostly isn't, and a 5-second clip at 720p can be 15β40 minutes on a 4090 even without speed LoRAs. If you're fighting memory on every run, the levers in descending order of effect are resolution, frame count, quantisation, then tricks like this node. A cleaner buys you a smoother handoff - it doesn't buy you a bigger card.
Where people get burned
Everything got slower. You're cleaning VRAM between nodes that share a model. Turn the aggressive unload off, or move the node.
Repeat runs take forever now. Node-output cache clearing is on. It's off by default; someone turned it on chasing RAM and forgot.
"It didn't fix my OOM." Then the peak is inside one stage, not between them. Nothing you insert between stages reduces the peak within one.
Expecting it to reload the browser page. The buttons reload what ComfyUI's UI needs reloaded; they are not a browser refresh. If your canvas is genuinely broken, Ctrl+F5 is still the tool.
Inputs (0)
No inputs
Outputs (0)
No outputs