Nodes/ComfyUI llama.cpp Suite/Release llama.cpp VRAM
ComfyUI Node

Release llama.cpp VRAM

Release llama.cpp VRAM

By Setmaster·Created 8 months ago·Updated 2 months ago· 6
Release llama.cpp VRAM
  • trigger
  • success
  • message
  • result_json

This is the node that makes LLM-then-diffusion on one GPU actually practical. You've used the LLM to write your prompt or caption your image - now you want that VRAM back before the sampler runs, and you want it back completely. Release llama.cpp VRAM is the pack's explicit "give it back" button: it releases this pack's owned llama.cpp VRAM, and in router mode it unloads every resident model while keeping the router alive.

The subtlety that trips people is right in the tooltip: the Boolean output reports whether the request was accepted, not whether the VRAM is already free. Read message and the result_json for the real state.

How it works

The node bridges into the pack's lifecycle coordinator. What actually happens depends on the mode:

  • Owned direct server - the owned llama-server process tree is stopped. VRAM is freed when the process is gone.
  • Owned router - all resident models are unloaded to a nonresident terminal state, and the router process is kept (when a trustworthy barrier is available; if not, the router is stopped as a safe fallback).
  • Attached endpoint - nothing. The pack never manages VRAM for a server it didn't start.

The important safety behavior: if a generation is active when you hit Release, the release is deferred until the final active generation lease exits, and concurrent releases are coordinated. So a Release that reports "accepted" may legitimately take a while to actually free memory. The README is explicit about which outcomes mean what: deferred and coalesced are accepted, nonterminal outcomes - check the status before assuming VRAM is free.

Inputs

Just a trigger for sequencing. That's the whole input surface - the node is a fire-and-check, not a configuration point.

Outputs: success (was the request accepted?), message (status summary, including queued or terminal state), and result_json (the full release result as JSON - this is where the "is it actually free yet" answer lives).

Where it fits

The canonical placement is after your LLM's last use and before the diffusion sampler - the "final diffusion-to-LLM-to-diffusion GPU handoff" the README's acceptance checklist calls out. Comfy's native Unload Models action does the same job for an owned runtime, so you have two paths; the node exists to put that release explicitly in the graph where you can sequence it and read its result.

Issues to expect

  • VRAM still busy after success - you saw an accepted-but-nonterminal result, or a generation was still running so the release deferred. Check result_json, then Server Status.
  • Nothing happened against an attached server - expected. Release only touches servers this pack owns; manage the remote one yourself.
CategoryLlamaCpp

Inputs (1)

NameTypeDefaultDescription
triggeropt*Optional dependency input used to sequence VRAM release.

Outputs (3)

NameTypeDescription
successBOOLEANWhether the release request was accepted; deferred requests complete after generation.
messageSTRINGRelease status summary, including queued or terminal state.
result_jsonSTRINGComplete release result as formatted JSON.