ComfyUI Node

Simple Prompt

The Danbooru tag editor hiding inside a plain-looking node

By 0nikod·Created 8 months ago·Updated 4 months ago· 2
Simple Prompt
    • prompt
    prompt_text

    If you prompt anime SDXL models - Illustrious, NoobAI, Pony - you already know the pain. You're typing tags blind, hoping hatsune_miku is spelled right and that the tag you half-remember actually exists in the model's vocabulary. Simple Prompt is the node that fixes the blind part: it's a full visual tag editor bolted onto a single node, with a real database of 70,000+ Danbooru tags searched in milliseconds. The Python class itself is a glorified pass-through; every bit of value lives in the frontend.

    What it actually is

    The node looks like a plain text box, but open it and you get a choice: Visual Mode (drag-and-drop tag capsules, color-coded by category) or Text Mode (a syntax-highlighted editor with autocomplete). That matters because Danbooru-vocabulary models respond to exact tags, not descriptions - a correct 1girl, long hair, looking at viewer beats a sentence every time. Autocomplete and alias search ("miku" finds hatsune_miku) are the killer features: they turn "I remember there's a tag for this" into a lookup instead of a guess.

    Don't reach for this if you're on Flux or any LLM-encoded model. The whole tag database is Danbooru's, so it only pays off where that vocabulary is the prompting language. For everyone else, this is the nicest way I've found to assemble a tag prompt without tabbing out to a booru site.

    How it works

    Under the hood it's three pieces. On startup the pack builds an in-memory DuckDB database and merges four sources into one view: your liked tags, your custom tags, a small bundled default set, and the main Danbooru tags.parquet. Search is an ILIKE against tag names and aliases, sorted by post count so the popular tag floats to the top - which is why the autocomplete feels instant and relevant. The tag data itself isn't in the repo; you fetch it from a GitHub release (SHA-256 checked) via Settings → Data Management → Update Now.

    The SimplePrompt class does almost nothing at runtime - it takes your prompt_text and hands it straight back. All the magic is a custom Vue 3 widget talking to API routes the pack registers with ComfyUI's server. That's also a nice safety net: even if the widget breaks, the node still passes your text through, so a workflow never silently dies on this node.

    The inputs and outputs that matter

    There's exactly one input and one output, and you barely touch either - the widget edits the text for you.

    • prompt_text (STRING, multiline): the full prompt as text. It's marked dynamicPrompts, so {2$$a|b} style wildcards still expand downstream. Whatever the widget does, this is what gets saved with your workflow.
    • prompt (STRING): the output, wired into your positive-prompt input - CLIP Text Encode, or a tag/text hybrid for LLM-encoded models.

    The inputs that actually matter live in the widget's settings gear: Smart Backspace (deletes the trailing comma/space when you remove a tag), Underscore Conversion (turns _ into a space as you add tags), and a language toggle. Weight tweaks work by double-clicking a tag capsule or selecting it and hitting Ctrl+Up / Ctrl+Down.

    Installing it

    ComfyUI Manager is the easy route: search "Simple Prompt" and click install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/0nikod/ComfyUI-Simple-Prompt.git
    cd ComfyUI-Simple-Prompt
    pip install -r requirements.txt
    

    Then restart ComfyUI. The real dependency is duckdb (plus aiohttp for the update fetches) - no models, no heavy weights, no GPU-side anything. The catch is data, not code: the repo ships only a ~1KB starter tag file, so the search is nearly empty until you hit Settings → Data Management → Update Now and pull the full Danbooru set.

    Where people get burned

    • Empty autocomplete right after install. Almost certainly you haven't run Update Now yet, or the fetch failed. Check you can reach GitHub, then retry.
    • A startup warning about duckdb missing. The pack logs this and runs degraded (node still works, search doesn't). pip install duckdb in the same Python environment ComfyUI uses, restart.
    • Expecting it to help on prose models. It won't hurt - it's just a text box - but a tag database is wasted on a model that wants sentences.
    • First run downloads nothing automatically. The full tag set is an explicit one-click update, which surprises people used to nodes that self-bundle their assets.

    One more honest note: the DuckDB engine is real and fast, but for autocomplete it's arguably overkill for a task SQLite would handle. It's not a problem, just a flex. The search latency genuinely is millisecond-level, and with 70k tags sorted by popularity, that's what makes the node feel better than typing blind. If you live in Danbooru-tag land, this is the prompt node I'd reach for.

    CategorySimplePrompt

    Inputs (1)

    NameTypeDefaultDescription
    prompt_textSTRING

    Outputs (1)

    NameTypeDescription
    promptSTRING