Prompt JSON
A JSON-backed prompt library node
- positive
- negative
- full list
If you've ever kept a notes file of prompts you liked and copy-pasted from it every session, this node is that habit turned into part of the graph. Prompt JSON (the node; the pack is called "Prompt List JSON") saves named positive/negative prompt pairs to a JSON file and hands them back out as string outputs, so your favorites live next to your workflow instead of in a separate text file you keep forgetting to open.
What it actually does
It's a small key-value store, not a prompt generator. You pick a list (a JSON file), give the prompt a name, write your positive and optionally negative text, and the node either saves that entry to disk or reads one back out. Point it at an existing list and name and you get retrieval; point it at a new list name and fill in the text and you get a save. The pack's own error handling backs this up - it raises a ValueError if you're missing a Prompt Name or a Positive Prompt when one's required, so the two modes (save vs. read) aren't fully automatic about which one you meant.
Where it earns a spot in your graph: you're iterating on a handful of go-to prompts across a project and don't want to keep them in a scratch text file, or you want a rotating pool to pull from randomly for a batch of test renders. It's the DIY version of what wildcard files and prompt-manager nodes do elsewhere, except the "database" is just a JSON file the node manages for you.
The inputs and outputs that matter
Everything in the schema is a required socket, but only a few matter on a normal run:
- Prompt List - pick an existing list or start a new one.
- New List Name / Prompt Name - the filename for a new list, and the unique key for this entry within it. Leave these blank at the wrong moment and you'll get that
ValueError. - Positive Prompt / Negative Prompt - multiline text boxes; positive is required when saving a new entry, negative is optional.
- Random (default off) - grab a random entry from the list instead of the one you named. Handy for batch variety without a separate randomizer.
- Overwrite (default off) - gates whether saving under an existing name actually replaces it, so you don't clobber a prompt you liked by accident.
- Console Log (default off) - prints prompt details for debugging. That's the terminal running your ComfyUI server, not the browser's dev console - a common first mix-up.
Outputs are three plain strings: positive, negative, and full list (the whole JSON file as one string - a debug/preview thing, not something you'd sample from). Wire positive and negative into your CLIP Text Encode nodes - they're STRING, not CONDITIONING, so they still need to go through an encoder.
How to install it
Easiest path is ComfyUI Manager - search for "Prompt List JSON" and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/TKRLAB/ComfyUI_Prompt_List_JSON.git
then restart. There's also a comfy-cli route (comfy node registry-install comfyui_prompt_list_json). No Python dependencies, no models - it's pure file I/O, which is all you'd want from something whose whole job is reading and writing small JSON files. The pack creates its data directories and list files automatically on first use, so there's nothing to set up beyond getting the node into the menu.
Common issues & troubleshooting
"ValueError: Prompt Name is required" (or Positive Prompt). The pack couldn't tell whether you meant to save or retrieve. Saving a new entry needs both fields filled; retrieving needs Prompt List and Prompt Name to actually match an existing entry, not a typo.
My edit didn't save over the old prompt. Check Overwrite - it defaults off specifically so a rerun of the same graph doesn't silently stomp a saved prompt. Flip it on when you mean to replace an entry.
My prompt list doesn't show up on another machine or install. The JSON files live inside the node's own folder under custom_nodes/, not anywhere shared. Running more than one ComfyUI install (portable plus a venv, say, or local vs. cloud)? Your lists won't follow you - copy the files by hand.
Console Log isn't showing anything in the browser. It prints to server stdout, so check the terminal ComfyUI is running in, not the browser's dev console.
The negative prompt doesn't seem to do anything. Not this node's fault - it's just storing and returning text. On a distilled, CFG-1 model (Flux Dev/Schnell, Z-Image Turbo, most Turbo/Lightning/Hyper checkpoints) no negative prompt does anything, because classifier-free guidance isn't running at all. Worth knowing before you debug a "broken" negative prompt this node saved perfectly correctly.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| Prompt List | COMBO | 1 options: New List | |
| New List Name | STRING | — | |
| Random | BOOLEAN | false | — |
| Overwrite | BOOLEAN | false | — |
| Console Log | BOOLEAN | false | — |
| Prompt Name | STRING | — | |
| Positive Prompt | STRING | — | |
| Negative Prompt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive | STRING | — |
| negative | STRING | — |
| full list | STRING | — |