Nodes/VELVET VICE — LTX/VELVET VICE LTX — Ollama Release Barrier
ComfyUI Node

VELVET VICE LTX — Ollama Release Barrier

Kick every Ollama model out of RAM before the render

By Velvet-Vice·Created 25 days ago·Updated 10 days ago· 2
VELVET VICE LTX — Ollama Release Barrier
  • prompt_package
  • prompt
strict_releasetrue
timeout_seconds20

Here's the problem this node exists for: Velvet Vice's LTX workflow uses a local LLM via Ollama to write the prompt - the "LLM as a prompt enhancer inside the graph" pattern that's become routine - and then LTX has to render with a BF16 video model plus a Gemma text encoder in the same memory budget. Ollama's model, fresh off writing your prompt, is still parked in RAM. Something has to force it out before the render starts, or the encode OOMs. VelvetViceOllamaReleaseBarrier is that "something," and unlike its legacy cousin it knows exactly which models to unload.

How it works

The node plugs between the pack's Prompt Director and the LTX prompt inputs, and it does one thing: guarantee that every Ollama model the Director used is unloaded from memory before the final prompt moves on. It reads a VELVET_VICE_PROMPT_PACKAGE - a structured bundle the Director emits - pulls the list of models it actually called (used_models) and the Ollama URL, then:

  1. If the Director's mode made no Ollama calls, it prints "release bypassed" and passes the prompt straight through. No pointless unload dance.
  2. Otherwise it sends each loaded model an empty generation with keep_alive: 0 (Ollama's unload-me-now flag) and polls /api/ps until the model is gone or the timeout_seconds deadline hits.
  3. If it can't confirm the release and strict_release is on, it raises - better to fail before the render than halfway through encode.

The node forces itself to run every execution (the NaN IS_CHANGED idiom), which matters here: a barrier that ComfyUI's cache skips would defeat the entire point.

The inputs

Only three, and you'll touch maybe one:

  • prompt_package - the VELVET_VICE_PROMPT_PACKAGE from the Prompt Director. This is not optional and not swappable; it's how the node knows which models to unload.
  • strict_release (true) - false turns a failed unload into a warning instead of a hard stop. Leave it true; a "barrier" that warns instead of stops is a decorative feature.
  • timeout_seconds (20) - how long to keep polling before giving up. If your LLM is slow to unload (or another process keeps it busy), bump this.

Output is prompt - the Director's final text, passed on to your LTX prompt nodes. The wiring is Director → this node → prompt destination.

Installing it

It's part of the Velvet Vice LTX pack, shared by the LTX 2.3 and 2.5 workflows. In ComfyUI Manager search "VELVET VICE - LTX" (registry velvet-vice-ltx), or:

cd ComfyUI/custom_nodes
git clone https://github.com/Velvet-Vice/velvet-vice-ltx

Restart ComfyUI and hard-refresh with Ctrl+F5. No Python dependencies in the pack - but you need ollama serve running locally (default http://127.0.0.1:11434), because the whole point is that the LLM is local. If you're upgrading an older Velvet Vice install, don't merge the old node directory into the new one; install fresh.

Common issues

  • "Invalid prompt package schema. Reconnect the Prompt Director directly to this Release Barrier." - you fed it raw text instead of the package. It validates and refuses rather than guessing. Reconnect properly.
  • "Could not confirm Ollama release before LTX rendering" - Ollama isn't running, the model name changed, or the unload is just slow. If you set strict_release false it'll warn and continue, but the render may then OOM - that warning is telling you something.
  • It says "release bypassed: the selected mode made no Ollama calls" - not an error. Your Director mode didn't use Ollama, so there's nothing to unload and the prompt passes through.

If you build a fresh Velvet Vice graph, this is the node to use. The legacy VelvetViceOllamaRelease is still around for old V1.1 workflows, but the barrier removes the human guesswork about what's loaded - that's the upgrade.

CategoryVELVET VICE/LTX

Inputs (3)

NameTypeDefaultDescription
prompt_packageVELVET_VICE_PROMPT_PACKAGE
strict_releaseBOOLEANtrue
timeout_secondsINT203–120

Outputs (1)

NameTypeDescription
promptSTRING