ComfyUI Node

Prompt Autocomplete

Stop memorizing Danbooru tags, type a # and let it find them

By SatadalAI·Created about a year ago·Updated 11 days ago· 3
Prompt Autocomplete
    • text
    text

    The hardest part of prompting is the vocabulary

    You know you want "dramatic lighting" and a dynamic camera angle - the exact tag an anime checkpoint was trained on just isn't in your head. Prompt Autocomplete is a text widget with a fuzzy search engine bolted onto it: type # in the box and you get a popup of tags and prompt fragments pulled from CSV/JSON files, filtered as you type. It's the quiet quality-of-life win of the SATA UtilityNode pack, and the node with the most search impressions of the whole set for good reason.

    It's honest about being a UI helper. The Python side is a pure pass-through: it takes the text you typed and returns it unchanged. All the real work happens in the bundled JavaScript, which is exactly the right place for it - autocomplete is a frontend problem, and doing the matching on the server would just add latency to every keystroke.

    How it works

    When you type the trigger character (# by default), the extension calls the pack's REST API to list snippet files in its prompt/ folder - it ships with character, lighting, camera_angle, atmosphere, attire and even NSFW-category CSVs - then builds a popup. Matching is subsequence fuzzy: the letters you type don't need to be contiguous in the tag. Type mstpc and it finds masterpiece, best quality, because subsequence matching only requires your characters to appear in order. Results are rank-scored so tighter matches sort higher, and the popup is capped at 100 items so a huge CSV doesn't freeze the UI. You can also pick 🎲 Random to drop a random entry from a category - a poor man's wildcard.

    Two settings live under ComfyUI's Settings menu (Settings → SATA Utility):

    • Trigger Character - what opens the popup. Default is #.
    • Global Mode - off by default, which means autocomplete only attaches to this node and to Prompt Machine's slots. Flip it on and it attaches to every text widget in ComfyUI.

    The inputs that matter

    There's exactly one input, text (a multiline box), and one output, text. Wire the output into a CLIP Text Encode node's positive prompt. The autocomplete runs while you type in the widget itself; the output is just your finished string.

    Install

    Same as the rest of the pack. No models to download, and the dependencies (opencv-python, spandrel, piexif) are ones most setups already have:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SatadalAI/SATA_UtilityNode
    # then restart ComfyUI
    

    Or use ComfyUI Manager and search for "SATA UtilityNode".

    Gotchas

    • The popup triggers when the trigger character is typed at the start of a token, then filters as you type after it. If nothing pops up, check you're typing # (not a period) and that the widget is one of the two node types enabled by default.
    • Snippets are fetched from the server and cached by the frontend, so after dropping a new CSV into the pack's prompt/ folder you need to refresh the page (or restart) before the new items appear.
    • It's subsequence matching over a few thousand lines - fine for the shipped files, but a 100k-line custom CSV will feel sluggish. The 100-item render cap is there for a reason; keep your libraries category-sized.

    If you live on an anime checkpoint and spend half your time in the prompt box, this node alone is worth installing the pack for. If you prompt FLUX in full sentences, it's less essential - but global mode is one setting away.

    CategorySATA_UtilityNode

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING