H3 Local LLM Stop (free VRAM)
The tiny node that kicks your 16 GB local LLM out of VRAM when you're done with it
- after
- status
The H3 Skill Promptor and Ask Local LLM are genuinely useful, but they park a 16+ GB model in VRAM while their llama-server runs. That's fine while the prompt-writing node is the last thing in your queue - and miserable when the next node on the graph needs that same memory for a diffusion pass. H3 Local LLM Stop is the cleanup crew: it kills the managed llama-server process (or an orphaned one a hard crash left behind), and process death releases all of its VRAM at once. That's the whole job, and it does it on purpose.
It's an output node with one optional input, one optional setting, and one output:
after- connect any upstream output here so the stop runs after that node.port- defaults to 8735; used only for reaping an orphaned server on that port. Note it also stops every managed slot (8736 and friends) - process death is process death.status- a string telling you what happened: stopped the managed server(s), stopped an orphan, or "no llama-server was running".
The trap that's actually the point
The after input isn't a nicety - it's load-bearing, and the tooltip spells out exactly why: ComfyUI schedules output nodes with no inputs first in the queue. Leave after unconnected and this node runs before the promptor, killing the server before it's ever used, and the promptor just cold-reloads a 16 GB model to compensate. So: wire anything from upstream into after. One wire, and the stop becomes "run this after the prompt writes, then free the card."
Install
Same pack as the rest of TrentNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt
(Or ComfyUI Manager, searching "Trent Nodes"; if it flags the pack as unsafe, that's the author's day-one repo-rename duplicate in the registry - the git clone path always works.) No extra pip deps for this node specifically - the shared requirement is the llama-server binary for the LLM nodes, which you've already sorted if the promptor works.
Where people get burned
- Forgetting the
afterwire. This is the one real footgun. If your server keeps dying before the promptor runs, it's not a bug - it's this node doing its job too early. Connect something upstream. - Expecting it to free VRAM for the next queue run. It frees VRAM now, at its position in the queue, which is exactly what you want for a node later in the same graph. It can't un-allocate memory retroactively, so put it where the memory is actually needed next.
- The status string. It's the only output, and it's honest: read it once when you're setting this up to confirm the kill actually happened (and that the server was found at all). After that, wire it to a text preview if you want the confirmation on screen.
It's a one-trick node and it knows it. If you run any of the local-LLM nodes in this pack, though, it's the difference between a workflow that OOMs halfway through and one that hands the card back cleanly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| afteropt | * | Connect any output here so the stop runs AFTER that node. IMPORTANT: left unconnected, ComfyUI schedules this output node FIRST in the queue - it would kill the server before the promptor runs, forcing a cold reload. | |
| portopt | INT | 87351024–65535 | Also reaps an orphaned llama-server on this port (leftover of a hard ComfyUI crash). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |