Json Prompt Loader /noEmbryo
Your prompt library as a JSON file, editable from inside the graph
- Prompt
Every serious ComfyUI user ends up with a pile of prompt fragments they type over and over: your reliable photography style block, the lighting formula that works with your model, the quality tags you can never remember. Most people solve this with a text file they copy-paste from, or a wall of wildcard nodes. Json Prompt Loader is the noEmbryo pack's actual answer: one JSON file of item: prompt pairs, a dropdown to pick one, and a slot to inject your own text into it. It's the node the pack's author recommends over his own older PromptTermList nodes, which tells you everything about where the design landed.
How it works
Point json_path at a .json file of item: prompt pairs (absolute path or relative to your ComfyUI install folder) and the dropdown selected_item populates with the item names. Pick one and the node outputs the stored prompt as a STRING from Prompt - ready to wire into a CLIP Text Encode node.
The clever part is the variable substitution. Each stored prompt can contain a placeholder like {subject}, and whatever you type into custom_prompt gets swapped in at that spot. The default variable is {subject}, but you can set variable to anything. So your library entry might read a candid photograph of {subject}, Kodak Portra 400 and you just type "a woman with a film camera" - clean separation between the template and the thing you change every run. If the selected prompt has no variable, your custom text just gets appended; if you select None, the output is your custom text alone.
The power move: edit the library from the node
You can also add, update, and delete items without ever touching the JSON file by hand. Put this in custom_prompt:
item=New Style
value=a gritty 35mm film look, high grain
and it writes the new entry back to the file (the status shows up as the node's output text). Update an item with the same format, or delete one by leaving value= empty. It even works on a fresh empty .json file - handy for building a library from inside ComfyUI. The None item is protected, so you can't clobber it.
What you actually set
- json_path - where the library lives. This is the one you'll change most.
- selected_item - dropdown of items; populated once the path is valid.
- variable - the placeholder to replace (default
{subject}). - custom_prompt - your per-run text, and the edit interface described above.
One output: Prompt (STRING).
Install and gotchas
ComfyUI Manager → search "noEmbryo", or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/noembryo/ComfyUI-noEmbryo.git
Restart, and the nodes appear under Add node > noEmbryo. No requirements, no models - stdlib only.
Where people get burned:
- After editing the file, refresh the page. The README is explicit about this: the dropdown reads the JSON when the node loads, so changes made outside the node won't show until you reload ComfyUI.
- A malformed JSON file collapses the dropdown to just
None. The node fails soft instead of erroring - which is nice, except that's also what an empty path does, so when the dropdown goes empty, check the file, not the node. item/valuekeys must be lowercase and on the first two lines. The parser checkslines[0].startswith("item=")andlines[1].startswith("value=")- any deviation silently does nothing.- The replace is literal.
{subject}is replaced as text; if your prompt uses the placeholder without braces, it won't match.
If you live in one model family and keep reusing the same style blocks, this is the tidiest prompt-library setup in the pack. File-based, versionable, and editable from the canvas.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| json_path | STRING | Path to a JSON file with `item`:`prompt` pairs | |
| selected_item | COMBO | 1 options: None | |
| variable | STRING | {subject} | If this variable exists in the selected item's prompt, it will be replaced with the custom_prompt text |
| custom_prompt | STRING | Text to replace the variable in the selected prompt. You can also use it to save a new item or update an existing one. To do that you should use the following format: item=... ... value=.... .... ... To delete an existing item, use an empty value: item=... ... value= |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Prompt | STRING | — |