Extensions/Visual Prompt Library
ComfyUI Extension

Visual Prompt Library

Thumbnail-based visual prompt part picker and library manager for ComfyUI.

By kazuya-bros·Created 2 months ago·Updated 2 months ago· 0
kazuya-bros/ComfyUI-VisualPromptLibrary
Nodes
On cloudLocal install
Stars0
Updated2 months ago
Readme

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 Picker node outputs selected prompt fragments as one STRING.
  • 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

  1. Add Visual Prompt Picker to your workflow.
  2. Open the Visual Prompt Library sidebar tab.
  3. Create or select a DB.
  4. Add category tags, such as 表情, 画角, or 背景.
  5. Add prompt tags with labels, prompt text, and optional thumbnails.
  6. In the node UI, load the DB and click prompt cards.
  7. Connect the prompt output 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