ComfyUI_Prompt_List_JSON Introduction
ComfyUI_Prompt_List_JSON adds a custom node to ComfyUI for keeping positive and negative prompts in named lists. Each list is stored as a JSON file, so you can reuse prompt ideas without repeatedly pasting long descriptions into your workflow.
You can use the node to create a list, save a prompt under a name, retrieve prompts from a list, or select one at random. It can also show prompt details in the console when you want to check what the node is using. This is useful when you are exploring variations of a scene, organizing prompts by project, or returning to an idea you saved earlier.
How ComfyUI_Prompt_List_JSON Works
Think of a prompt list as a small collection of labeled cards. Each card has a prompt name and two spaces for text:
- The positive prompt describes what you want in the image.
- The negative prompt describes what you want to avoid.
The node stores those cards in a JSON file. You do not need to write JSON yourself to use the node, but the format makes the saved prompts structured and readable. A list containing one prompt might look like this:
{
"SunsetScene": {
"positive": "A breathtaking sunset over the mountains",
"negative": "Low quality, blurry"
}
}
In this example, SunsetScene is the card’s name. The two descriptions are its saved positive and negative prompts. When the node runs, it provides separate Positive Prompt and Negative Prompt outputs, plus a Full List output containing the list as a JSON string. You can connect the prompt outputs to the appropriate parts of your ComfyUI workflow.
You can also turn on Random to choose a prompt from an existing list. This is helpful when you want to try different saved ideas without choosing each one manually.
ComfyUI_Prompt_List_JSON Features
Named prompt lists
Prompt List lets you select an existing list or choose to create a new one. When creating a list, enter its name in New List Name. Keeping separate lists can help you organize ideas by subject or project, such as portraits, landscapes, or character concepts.
The node manages the files it needs automatically. The author’s example shows that each list is stored in its own JSON file.
Positive and negative prompts
Give each saved entry a Prompt Name so you can identify it later. A Positive Prompt is required when creating a new prompt; a Negative Prompt is optional.
For example, you might name an entry SunsetScene, use A breathtaking sunset over the mountains as its positive prompt, and use Low quality, blurry as its negative prompt. The names help you find ideas, while the descriptions supply the text for your image workflow.
Updating a saved prompt
Set Overwrite to True when you want to replace an existing prompt that has the same name. Its default is False, which helps you avoid replacing a saved entry unintentionally. Check the prompt name and selected list before enabling overwrite, especially when you have several similar ideas.
Random selection
Set Random to True to select a prompt from an existing list at random. Its default is False. For example, a list of landscape ideas can give you a different starting point as you experiment. Turn random selection off when you need to work with a specific prompt.
Console logging
Set Console Log to True to print prompt details in the ComfyUI console. This can help you verify which prompt was used or investigate an unexpected result. Logging is off by default.
Example of prompt details in the console
Outputs
The node provides three outputs:
| Output | What it contains |
|---|---|
| Positive Prompt | The saved or retrieved positive description |
| Negative Prompt | The saved or retrieved negative description |
| Full List | The entire prompt list as a JSON string |
The first two outputs are useful when you want to use a prompt in an image workflow. Full List is useful when you need the complete collection in another part of a workflow.
Example: Save and explore an idea
To add an idea, select or create a prompt list, give the idea a unique Prompt Name, and enter its positive and optional negative descriptions. Turn on Console Log if you want to check the details after running the workflow. If you later revise an entry with the same name, enable Overwrite before running it again.
Once you have several entries in the list, enable Random when you want the node to pick among them.
Example node with a selected prompt list
Troubleshooting ComfyUI_Prompt_List_JSON
The node reports that the prompt name is missing
- Find the Prompt Name input.
- Enter a name for the prompt you want to save.
- Run the workflow again.
The author notes that missing required fields can produce a ValueError. The console may provide more detail about the error.
The node reports that the positive prompt is missing
- If you are creating a new prompt, check Positive Prompt.
- Enter a description of what you want to see in the image.
- Run the workflow again.
A positive prompt is required for a new entry; the negative prompt is optional.
The node reports that the new list name is missing
- Check whether Prompt List is set to create a new list.
- If it is, enter a name in New List Name.
- Run the workflow again.
If you meant to use an existing list, select that list instead.
A prompt is not changing as expected
Check which Prompt List and Prompt Name you selected. If you are trying to replace a saved prompt with the same name, check whether Overwrite is set to True. You can also enable Console Log and inspect the console to help confirm the prompt details.
Frequently asked questions
Do I need to edit JSON files to use the node?
No. The node provides inputs for creating and managing prompts. JSON is the format used to store the lists.
Is a negative prompt required?
No. The author lists Negative Prompt as optional.
What happens when I enable Random?
The node selects a prompt from an existing list at random. Leave it off when you want to work with a particular entry.
Can I keep different groups of ideas?
Yes. Prompts are stored in individual JSON list files, so you can use separate lists for different collections of ideas.
How can I check prompt details when something goes wrong?
Enable Console Log, run the workflow, and inspect the ComfyUI console. The author notes that error details also appear there.
Learn More about ComfyUI_Prompt_List_JSON
- ComfyUI provides the application in which this custom node runs.
- ComfyUI_Prompt_List_JSON repository contains the author’s original documentation and examples, including images of the node and common errors.
- The project’s GNU General Public License v3.0 explains the terms under which the extension is shared.
