Visual Prompt Library
Thumbnail-based visual prompt part picker and library manager for ComfyUI.
ComfyUI Visual Prompt Library
Thumbnail-based visual prompt part picker and library manager for ComfyUI.
This custom node is meant for building a personal visual prompt dictionary: expressions, camera angles, lighting, backgrounds, poses, outfits, accessories, and other prompt fragments can be stored with thumbnails and selected visually inside a workflow.
Features
Visual Prompt Pickernode outputs selected prompt fragments as oneSTRING.- Sidebar library manager for editing shared JSON databases.
- Category tags and prompt tags.
- Thumbnail support with file upload, data URL, and recent ComfyUI output selection.
- Import and export JSON libraries.
- Search within the selected category.
- Remembers the last selected DB, category, and view mode in the browser.
- Three view modes: large thumbnail, small thumbnail, and text.
Why This Exists
Many prompt selector tools focus on text tags, styles, wildcards, or preset buttons. This project focuses on a visual prompt dictionary workflow:
- See a thumbnail.
- Pick the prompt part.
- Send the selected fragments into the ComfyUI graph as a
STRING.
It is especially useful for prompt parts that are hard to remember from text alone, such as facial expressions, poses, camera composition, and background types.
Installation
Clone this repository into ComfyUI/custom_nodes.
cd ComfyUI/custom_nodes
git clone https://github.com/kazuya-bros/ComfyUI-VisualPromptLibrary.git
Restart ComfyUI after installing or updating Python routes.
For JavaScript-only changes, a browser hard reload is usually enough.
Usage
- Add
Visual Prompt Pickerto your workflow. - Open the
Visual Prompt Librarysidebar tab. - Create or select a DB.
- Add category tags, such as
表情,画角, or背景. - Add prompt tags with labels, prompt text, and optional thumbnails.
- In the node UI, load the DB and click prompt cards.
- Connect the
promptoutput to a text prompt node.
Selected fragments are joined by the node's delimiter setting.
Library JSON
Shared databases are stored locally under:
data/libraries/*.json
This folder is ignored by git so private prompt libraries are not published accidentally.
A small starter sample is included:
data/sample_visual_prompt_library.json
Each category contains prompt parts:
{
"id": "gentle_smile",
"label": "微笑み",
"prompt": "gentle smile, relaxed eyes, closed mouth",
"negative": "",
"thumbnail": ""
}
thumbnail can be empty, a file path, a ComfyUI /view?... URL, or a data URL. The manager UI can also resize a selected image into a compact data URL.
Sample Data Policy
The included sample prompts are intentionally small and original. Do not copy paid prompt dictionaries, books, or third-party datasets verbatim into a public repository unless you have permission.
For personal use, imported JSON libraries stay in data/libraries/.
Publishing Status
This repository is prepared for personal GitHub publishing.
Before publishing to Comfy Registry:
- Confirm that
PublisherId = "kazuya-bros"matches your Comfy Registry publisher ID. - Add screenshots.
- Confirm the package name and version.
See:
docs/publishing-checklist.md
Similar Tools
This project overlaps with prompt selector and prompt management tools, but the intended focus is different:
- Text prompt selectors and style selectors are good for preset text workflows.
- Wildcard tools are good for random or combinatorial prompt generation.
- Visual Prompt Library is for manually choosing prompt fragments from thumbnails and returning them as graph output.
License
MIT