Nodes/ComfyUI-MAINodes/H3 Conditioning Bank (encode once, no TE per item) [alpha]
ComfyUI Node

H3 Conditioning Bank (encode once, no TE per item) [alpha]

Encode your prompt once, stop paying for the text encoder every time

By matlowai·Created 17 days ago·Updated about 18 hours ago· 112
H3 Conditioning Bank (encode once, no TE per item) [alpha]
  • conditioning
  • conditioning
  • report
bank_keyrun
store_diroutput/h3_conditioning
modeuse bank if present (default)
prompt

On a small card, the MiniMax H3 text encoder is the biggest single thing you're making room for - and it has nothing to do with what you're generating. The author measured it at ~15 GB resident on the int8 ref2va stack, 21.2 GB peak on a simulated 16 GB card. H3 Conditioning Bank is the "encode once, reuse forever" answer: it caches an encoded prompt to disk so later queue items read the tensors back instead of loading the text encoder at all.

The trick that makes it worth a node (rather than just "cache the conditioning"): the conditioning input is lazy. On a bank hit, ComfyUI never executes the encode node - or the CLIP loader behind it. The text encoder isn't just unloaded, it's never staged. That's a different thing from the sampler cache, and it matters more the smaller your card.

Where you'd actually use it

The pack's own use case is the rolling-window flow: H3 Window Plan splits a de-rope into budgeted windows, and each window is a queue item. Without the bank, a restart or an interleaved workflow makes every window item re-encode the prompt. With it, the first item encodes and banks, and every later window reads the tensors off disk.

But it's not window-specific. The README's honest framing is the useful one: requeueing the same graph with only a downstream widget changed already hits ComfyUI's node cache, so the bank changes nothing there. What flushes that cache is queueing a different workflow in between, restarting ComfyUI, or editing anything upstream of the encode. The bank survives all three - and it's shared across graphs, so a window run, a seed hunt, and an extension chain on the same prompt encode once between them.

Inputs that matter

  • conditioning - from the encode node (H3 Image-to-Video / Reference-to-Video). Lazy: never evaluated on a hit.
  • bank_key (default run) - names the bank. One key per (prompt, reference, canvas, length). Nothing but the prompt is fingerprinted for you.
  • mode - use bank if present or refresh (re-encode, overwrite).
  • prompt (optional) - wire the same text that feeds the encode node. Its hash joins the filename, so an edited prompt misses the bank instead of silently serving the old take.

Outputs: conditioning (for the guider) and a report string.

The price is staleness - manage the key

This is where people get burned. The key is yours to manage. Change the reference image, the canvas, or the clip length and the bank will happily serve you the old conditioning unless you change bank_key or hit refresh. Wiring the prompt string covers the prompt and only the prompt. The node tells you this in its docstring; believe it. A stale conditioning is silent and subtle - nothing errors, you just get a render conditioned on an old idea of the shot.

One nice detail: conditioning is banked on the CPU and the model moves it to the GPU itself, so a bank written under one VRAM mode loads under any other. And store_dir defaults to output/h3_conditioning - keep it off /tmp, which is a RAM disk on most Linux installs and defeats the "survive a reboot" point.

Installing it

Pure-Python pack:

cd ComfyUI/custom_nodes
git clone https://github.com/matlowai/ComfyUI-MAINodes

Restart, find it under conditioning/minimax. Example graphs want ComfyUI-KJNodes; the nodes don't. It's alpha - the interface could still move - but it's the rare alpha node whose job is pure cost saving, and it does that job well.

Categoryconditioning/minimax

Inputs (5)

NameTypeDefaultDescription
conditioningCONDITIONINGfrom the encode node; on a bank hit this link is never evaluated, so the text encoder never loads
bank_keySTRINGrunnames the bank. One key per (prompt, reference, canvas, length): nothing but the prompt is fingerprinted for you
store_dirSTRINGoutput/h3_conditioninga relative path lands inside the ComfyUI working directory. Avoid /tmp: it is a RAM disk on most Linux installs and the bank is meant to survive a reboot
modeCOMBOuse bank if present (default)2 options: use bank if present (default), refresh (re-encode, overwrite)
promptoptSTRINGwire the same text that feeds the encode node; its hash joins the filename so an edited prompt cannot be served a stale bank

Outputs (2)

NameTypeDescription
conditioningCONDITIONING
reportSTRING