VRAM Context Test (diagnostics)
A VRAM benchmark that measures your real model path, not a toy
- report
This is a diagnostics node, and it's the kind of thing most packs don't ship but every heavy user ends up wanting: a tool that answers "does this LLM actually fit my card at this context length, with everything else running?" The OldTimeRadio pipeline runs a local LLM as its writer - the thing that turns a story source into a script - and LLMs are the biggest single VRAM pressure in that graph. OTR_VRAMContextTest measures VRAM (both PyTorch's accounting and NVML's) and CPU RAM at a ladder of prompt lengths, so you can decide quantization and context settings on evidence instead of vibes.
What makes it worth using over a generic benchmark: it runs inside ComfyUI, through the same canonical loader path (request_slot + make_generate_fn) that the real writer node uses. The older headless script this replaced loaded models outside ComfyUI and systematically undercounted by roughly 500 MB–1 GB, because it never accounted for ComfyUI's model management, other imported custom nodes, and co-resident state. This node's numbers are the numbers you'll actually see at render time. The quantization config, attention backend, tokenizer setup, and prompt-truncation logic all match the writer exactly.
The inputs are few and self-explanatory:
model_id- which LLM to probe, a dropdown mirroring the writer's slots. Suffix tags like[ALPHA]/(EXPERIMENTAL)are stripped before the HF lookup, same as production.probe_lengths- comma-separated token-length targets, default2048,4096,6144,8192,12288,16384,20480,24576. Each probe builds a prompt of roughly that many tokens and runs a single short generation, capturing peaks.max_new_tokens- generation length per probe. 16 is the floor and usually right: KV-cache growth is the thing that scales with context, not the generation length. Raise it to 64–128 if you also want a tokens/sec reading.optimization_profile- same widget as the writer:Pro (Ultra Quality),Standard, orObsidian (UNSTABLE/4GB). This is where 4-bit NF4 vs full precision gets decided.measurement_label- an optional tag stamped into the ledger entry, handy when you're comparing the same node across configs or workflows.
The single output is report, a markdown STRING you can read in the UI, pipe to a Save Text node, or append to your own notes. It's an output node, so it runs even with nothing downstream. As a side effect it stamps results into ledger.meta.vram_test_results[], so a run is inspectable after the fact.
Where people get burned: placement. The README is explicit - drop this into a small smoke workflow with no writer, no video engine, no competing models, or the probe measures your other nodes too and the numbers are garbage. It loads the chosen LLM once, walks every probe length in sequence, then unloads. And it's an LLM-probing tool, not a general VRAM meter - if your question is about video engines, the pack's README VRAM table is the profile you want instead.
Install is the same as the rest of the pack: ComfyUI Manager → "ComfyUI-OldTimeRadio", or git clone https://github.com/jbrick2070/ComfyUI-OldTimeRadio into custom_nodes/, check out v2.0-alpha, restart. No extra models to fetch for this node itself - it uses whatever LLM you pick from the dropdown, and if that model isn't on disk the run fails loudly naming the missing weight. A honest tip: run it once after you've tuned the writer's profile, then keep the report somewhere. The next time an episode OOMs mysteriously, that baseline is what tells you whether the writer grew out of your card or something else did.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model_id | COMBO | mistralai/Mistral-Nemo-Instruct-2407 | Which LLM to probe. Mirrors the LLMScriptWriter dropdown so production-relevant models are first-class. Suffix tags ([ALPHA], (EXPERIMENTAL)) are stripped before the HF lookup -- same behaviour as the writer's request_slot path. |
| probe_lengths | STRING | 2048,4096,6144,8192,12288,16384,20480,24576 | Comma-separated token-length targets. Each probe builds a prompt of approximately this many tokens and runs a single 16-token generation, capturing VRAM nvml + VRAM torch + CPU RAM peaks. Default probes: 2048,4096,6144,8192,12288,16384,20480,24576 |
| max_new_tokens | INT | 164–256 | Generation length per probe. 16 is the smallest useful sample for VRAM measurement (KV cache growth is the relevant scaling factor, not generation length itself). Raise to 64-128 if you want to also bench tokens/sec at this context size. |
| measurement_labelopt | STRING | Optional tag for this run, stamped into the ledger entry. Useful when running the same node across multiple workflows or after VRAM-affecting config changes. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| report | STRING | — |