KV Load Inline
Paste a whole prompt library into one text box
- store
KV Load Inline is the node that finally turns your pile of copy-pasted prompt fragments into something you can reference by name. It's the simplest node in the KVTools pack and usually the first one you reach for: you type or paste key/value data into a big text box, it comes out the other end as a single KV store, and downstream nodes like KV Get Value can pull any key out of it.
Think of it as a mini config file living inside your graph. Instead of pasting the same 80-token style string into every workflow, you define millerlight-basic: surreal apocalypse, by hironymus bosch... once, and then reference the key everywhere. Change it in one place, every workflow that reads it changes with it. That's the whole pitch.
How it works
Mechanically there's very little to it - which is the point. The node calls a parser (_parse_data in kv_nodes.py) with auto format detection:
- If the text starts with
{or[, it's parsed as JSON. It must be an object (a dict), not an array. - Anything else is parsed as
key=valueorkey: valuelines. Blank lines and#comments are skipped, so you can keep your data annotated.
Either way you get a plain Python dict out, tagged with the pack's custom KV type so the other KV nodes know what they're receiving.
The inputs that matter
Just one real one:
data(multiline string) - your whole key/value blob. The placeholder shows both the JSON and thespeaker=Tomline style.
The single output is store (type KV), which you wire straight into KV Get Value.
The Edit mode bit
The README's real selling point is the frontend's Edit mode toggle. While you're editing inline data, the node's output is disabled and runs are suppressed - so you can rewrite a prompt block without a half-baked string firing off a generation the instant you type. When you're happy, flip Edit mode off to lock the text and let runs resume. It sounds like a gimmick until you've had a typo queue five jobs.
Install
Standard pack install, no extras. In ComfyUI Manager: Install via URL → paste https://github.com/millerlight/ComfyUI-KVTools → Install → restart. Or manually:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/millerlight/ComfyUI-KVTools.git
Then restart ComfyUI and hard-reload your browser (Ctrl/Cmd+Shift+R) so the frontend extension loads. There's no dependency dance here: the pack's requirements.txt is empty and the parser is pure Python, so nothing else needs installing.
Common issues
- "JSON is not an object (dict)" - you pasted a JSON array or a scalar. Wrap it in braces:
{"a": "b"}. - "Invalid KV line" - the parser hit a line with no
=or:separator. It tells you the line, so go look. - Blank previews while editing - that's Edit mode being on, by design. Toggle it off.
The one thing it won't do is read from disk - that's what the registry nodes are for.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| data | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| store | KV | — |