MD: Save Conditioning πΎ
Stop re-encoding that negative prompt on every run β cache it as .bin
- conditioning
- conditioning
- filepath
If you run the same static prompt hundreds of times - and if you're doing ACE-Step audio work, that's exactly what happens, where the same long negative gets encoded before every render - you are paying the text-encoder tax on repeat. MD_SaveConditioning is the pack's answer: it dumps a CONDITIONING stream to disk as a .bin file, and its sibling MD_LoadConditioning reads it back later, skipping the encode entirely.
Think of it as a cache node for the most expensive and least-varying part of your workflow. Encoding is real compute, especially with big text encoders on audio pipelines, and it's wasted work when the string hasn't changed.
How it works
You feed any CONDITIONING stream in - the author's own tip is to wire your static negative prompt here, since that's the thing you almost never change - give it a filename, and the node serializes the conditioning to ComfyUI/models/conditionings/<filename>.bin. The file lands in a folder ComfyUI already knows about, so the Load node's dropdown picks it up automatically.
The one input that trips people up is force_update. It's an integer, and ComfyUI caches node results: if nothing changed, the node won't re-run and your .bin stays stale. Bump force_update to a new value and it re-saves. The tooltip's honest advice is to set the widget to randomize if you always want it to write. There's also a debug_mode (Silent / Info / Verbose) for confirming what got written and where.
Outputs are simple: conditioning passes your input straight through, and filepath tells you the exact .bin path if you want to point at it later or clean it up.
The trap: architecture-specific caches
Conditioning is a bundle of embeddings produced by your text encoder, which means a cache is only valid for the exact model architecture that made it. Save a negative with an SD1.5 CLIP and load it into an SDXL or ACE-Step graph, and you'll get wrong or broken results - the Load node's tooltip spells this out: ensure the model architecture matches the cache. Name files after the model and encoder they were made for (acestep_neg, as the author suggests) and you'll save yourself a confusing hour.
Why you'd reach for it
Two sweet spots. First, batch work: A/B testing samplers, schedulers, or seeds while holding the negative constant is dramatically faster when the encode happens once. Second, any workflow where ComfyUI would otherwise re-encode on every queue. It's a pure utility node - zero opinions, no model downloads, no heavy deps beyond the pack's standard install.
Installing
It ships in MD Nodes. ComfyUI Manager: search MD Nodes and install, or:
cd path/to/ComfyUI/custom_nodes
git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
cd ComfyUI_MD_Nodes && pip install -r requirements.txt
Then restart ComfyUI. Note the pack's requirements are broad (librosa, soundfile, pyloudnorm, pedalboard, matplotlib, pynvml and more) even though this node only needs the core serialization code - that's the cost of one pack covering audio, sampling, and system utilities.
The usual failure mode isn't the node, it's forgetting the model-match rule. Keep your caches labeled, randomize force_update when you want fresh writes, and this is the rare "saves you minutes, costs you nothing" node worth keeping in your graph.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | CONDITIONING DATA β’ Purpose: The encoded text/audio data to cache. β’ Options: Any standard CONDITIONING stream. β Recommended: Connect your static negative prompt here. | |
| filename | STRING | cached_conditioning | FILENAME PREFIX β’ Purpose: The name of the saved .bin file. β’ Options: Any valid text string (without extension). β Recommended: Use recognizable names like 'acestep_neg'. |
| force_update | INT | 00β9007199254740991 | FORCE UPDATE TRIGGER β’ Purpose: Change this value to force ComfyUI to re-save the file. β’ Range: 0 to 9,007,199,254,740,991 (JS-safe range). β Recommended: Set widget to 'randomize' if you always want it to save. |
| debug_mode | COMBO | 1 - Info | LOGGING VERBOSITY β’ Purpose: Controls console output detail level. β’ Options: 0 (Silent), 1 (Analytics Report), 2 (Full trace). β Recommended: 1 - Info for confirmation. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | β |
| filepath | STRING | β |