f6d3adabc358eba479a00b2cc3c6f40e36aa0e57
ComfyUI-KVTools
Small utility nodes for key/value workflows in ComfyUI. Custom JSON key-value pairs from multiple external files.
Nodes
- KV Load Inline – type/paste JSON or
key=valuelines; emits a KV store. - KV Load From File – load a JSON file from
base_path + file_name(UTF-8, auto-detected JSON/KV). - KV Load From Registry – dropdown of JSON files found in
./custom_stores(UTF-8). - KV Get – pick a key (dropdown) and output its value (optionally cast to string/int/float/bool). Also outputs all keys as text.
- KV Inspect – debug helper to print keys.
Installation
With ComfyUI-Manager
- In ComfyUI, open Manager → Install via URL.
- Paste the repository URL (e.g.,
https://github.com/millerlight/ComfyUI-KVTools) and install. - Restart ComfyUI.
Manual
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/millerlight/ComfyUI-KVTools.git
# or unzip the archive into this folder
Restart ComfyUI afterwards.
Usage
- For KV Load From Registry, put your JSON files into:
Be careful, your json files must be in the correct format (just key/value pairs) !!!
<ComfyUI>/custom_stores/*.json
{ "speaker": "Tom", "speak": "hello" }
On startup, a registry file is written to:
`custom_nodes/ComfyUI-KVTools/web/kv_registry.json` (served at `/extensions/ComfyUI-KVTools/kv_registry.json`).
- The **KV Get** node shows a **dropdown** of keys without pressing Run. It prefers keys from an upstream file loader (via registry); otherwise it reads keys directly from an inline loader connected to its `store` input.
- All reading is **UTF‑8**, and format is **auto-detected** (`json` or `key=value` per line).
## Troubleshooting
- After updating, **clear the browser cache** or do a **hard reload (Ctrl+F5)** to ensure the frontend JS is reloaded.
- If the dropdown doesn’t appear, confirm the web assets are served:
- `http://127.0.0.1:8188/extensions/ComfyUI-KVTools/extension.js`
- `http://127.0.0.1:8188/extensions/ComfyUI-KVTools/kv_registry.json`
- If an old workflow loads with a blank `as_type`, the node defaults to **string** automatically.
## License
MIT
Languages
JavaScript
71.5%
Python
28.5%