凤希AI - 清理显存
The node that actually kicks the models off your GPU
- anything
- output
What it's for
You've hit the wall everyone hits: ComfyUI holds onto the last model it loaded until something forces it out, so the second half of your workflow starts with 3GB of VRAM already gone. nvidia-smi shows a big number, the next sampler OOMs, and you start clicking "Unload Models" in the menu like it's a slot machine.
FxAiCleanGpu (凤希AI - 清理显存) is a node that does the unload inside the graph, at a point you choose. Nothing more. It's the blunt instrument in this pack - deliberately.
What it actually does
This is not a torch.cuda.empty_cache() wrapper with a nice label. Under the hood it calls the pack's shared release_resources(unload_models=True, empty_cuda=True), which runs, in order:
comfy.model_management.soft_empty_cache()comfy.model_management.unload_all_models()- every loaded checkpoint, CLIP, VAE and LoRA goestorch.cuda.synchronize()→empty_cache()→ipc_collect()gc.collect()- On Windows only:
SetProcessWorkingSetSize(-1, -1), which hands the process working set back to the OS so Task Manager's number drops too
That's the same sequence the ComfyUI menu buttons trigger, just placed exactly where you want it in the execution order.
Inputs and outputs
There's one input, anything (wildcard *), and one output, output (*), which is the same value you put in. The author's tooltip is refreshingly honest about the point of it: wire the previous stage's output in, the node cleans up and doesn't touch your data.
The wildcard socket exists for ordering, not for data. ComfyUI runs nodes in dependency order, so whatever you plug into anything is guaranteed to have finished before the cleanup happens. The value then passes straight through, so you can chain on.
One practical trick: connect the cheapest thing that still gets the order right - the frame count int, the loop index, a small latent. A pass-through holds a reference to whatever flows through it, so if you wire a 240-frame IMAGE batch into it, that batch is still alive while you're trying to free memory.
It's registered as an output node, which means it always executes on every queue, regardless of caching downstream.
Installing
The pack is Chinese-language, ~200 nodes, MIT-licensed, and installs like any other custom node pack:
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
Restart ComfyUI. Or, in ComfyUI Manager, search fxai-toolkit (registry publisher fxai, display name "FxAi(凤希全能节点)") and install from there.
On first import the pack pip-installs soundfile and psutil into whatever Python you're running ComfyUI with. No model downloads are needed for this node. The README also points at the author's QQ group (775649071) and a Bilibili channel for tutorials, which is where the video-workflow documentation actually lives.
Where it bites
It's an all-or-nothing unload. Every model leaves VRAM, including the one the next stage needs. That's correct at a phase boundary (video segments, a batch of upscales, the end of a run) and actively harmful inside a loop where each iteration needs the same checkpoint - you'll spend more time reloading weights off disk than you save. If you just want the allocator tidied without evicting weights, you want this pack's other cleanup node instead.
It can't clean up what's still referenced. If a big tensor is live in a Python variable upstream, empty_cache() gives you back only the unused pool. Free what's actually held, then clean.
Leaving one in the graph by accident is a real cost. Output nodes run every time. If it's sitting after your last sampler in a workflow you run all day, you're re-loading weights every single queue.
The node is missing from the menu. The pack loads its ~200 nodes one at a time in a try/except, so a failed import prints ❌[凤希AI] 节点加载失败 in the console and silently skips that node rather than breaking the whole pack. Check the console output first, then confirm psutil and soundfile installed, then restart.
The honest framing: this is a memory-pressure tool, not a speed tool. It shows up in low-VRAM video workflows because it lets you run three stages that can't coexist, and it costs you the reload every time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| anything | * | 接上一环的输出,本节点只负责清理,不动数据。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |