This repository provides a custom node for ComfyUI that allows managing positive and negative prompts in a structured JSON format. The node supports adding, updating, and logging prompts, ensuring seamless integration into your workflow.
This repository provides a custom node for ComfyUI that allows managing positive and negative prompts in a structured JSON format. The node supports creating new prompt lists, random prompt selection, and logging prompt details to the console for seamless integration into your workflow.
git clone https://github.com/TKRLAB/ComfyUI_Prompt_List_JSON.git
install comfy-cli
comfy node registry-install comfyui_prompt_list_json
False
): Enable random selection of prompts from the list.False
): Whether to overwrite an existing prompt with the same name.False
): Prints prompt details to the console for debugging.test.json
test
girl on helmet
concept art Girl in black thin, oily latex, black motorcycle helmet, black glass on helmet, pours a bucket of yellow paint on himself, paint dripping down his body, yellow silk long scarf, sexy, dynamics. Black mirrors in the background, reflections. digital artwork, illustrative, painterly, matte painting, highly detailed
photo, photorealistic, realism, ugly
True
True
True
Prompts are stored in individual JSON files in the following format:
{
"SunsetScene": {
"positive": "A breathtaking sunset over the mountains",
"negative": "Low quality, blurry"
}
}
You can also use this node programmatically. Here's an example:
from your_module import ComfyUI_Prompt_JSON
manager = ComfyUI_Prompt_JSON()
positive, negative, full_list = manager.process(
**{
"Prompt List": "New List",
"New List Name": "NaturePrompts",
"Prompt Name": "SunsetScene",
"Positive Prompt": "A breathtaking sunset over the mountains",
"Negative Prompt": "Low quality, blurry",
"Random": False,
"Overwrite": True,
"Console Log": True
}
)
ValueError
if a required field (e.g., Prompt Name
or Positive Prompt
) is missing.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Enjoy using the Prompt List JSON node with ComfyUI! 🎨