Nodes/Danbooru Tag JP Assist/Danbooru Tag JP Assist
ComfyUI Node

Danbooru Tag JP Assist

Danbooru tags on tap, right in the prompt box you're already typing in

By ukr8b3g-cmyk·Created 2 months ago·Updated 24 days ago· 3
Danbooru Tag JP Assist
    • text
    text

    If you've ever sat in front of an Illustrious prompt box trying to remember whether it's long_hair or hair_long, this is the pack for you. Danbooru Tag JP Assist is an autocomplete for every multiline text field in ComfyUI: you type, a popup of Danbooru tags appears, you hit Enter or click, and the tag lands in your prompt. Its actual party trick is the JP half of the name - type 少女 or ロングヘア into the box and it inserts 1girl or long_hair. It's built for the JP-anime crowd, but anyone wrangling tags gets the same value, and it's aimed at the exact skill the community keeps repeating: stop guessing tags, look them up in the vocabulary the model was trained on.

    The honest framing up front: this isn't really a graph node. The DanbooruTagJPAssist node you see in the node menu is a pass-through - text in, text out, it does nothing to your data. The real work lives in a JavaScript extension (web/danbooru_tag_jp_assist.js) that watches every textarea in the UI, plus a few HTTP routes on the ComfyUI backend that read the tag CSVs. That's also why it's so light: no API, no key, no model download, no GPU. It's a dictionary, not an inference engine.

    How it works

    The frontend extension attaches to every multiline text area, waits until you've typed a token (it splits on commas and newlines), then fetches the merged tag list from /danbooru-tag-jp-assist/tags and scores matches: exact hit first, then prefix, then substring. Sorting is configurable - match order, popularity/count, or A-Z - and the popup handles keyboard navigation (arrows, Enter/Tab to insert, Escape to dismiss) and mouse clicks. Insertion is the thoughtful part: it manages the comma spacing for you, and it has a toggle to replace _ with spaces, so long_hair becomes long hair - the Krea-style natural-prompt look that the Anima crowd uses for the two-block tag-plus-prose style.

    The data is plain CSVs. tags/tag_files/ holds English tag lists (the repo ships a Danbooru 2025 snapshot, e621, Anima artist and character phrase lists, and a lightweight natural-language dictionary) and tags/translation_files/ holds the Japanese alias files. The big danbooru_tags.csv isn't in the repo - it's downloaded at startup from a Hugging Face dataset (SpadeA/danbooru-tag-csv) when the update toggle is on. The backend does an ETag/last-modified check, only re-downloads when the remote changed, and falls back to the local copy if HF is offline or the file vanishes. The flagship All mode merges every tag and translation file into one deduped candidate list (Danbooru CSV wins conflicts) - useful, but the author flags it as beta and warns it's slower than a single file.

    The settings that actually matter

    The node's one input, text (multiline STRING), flows straight to its text output - don't wire it into your graph expecting something clever. The real controls live in ComfyUI Settings → Danbooru Tag JP Assist:

    • Tag source - Hugging Face, your own files, or Both (default). Both is what you want until you have a reason otherwise.
    • Tag file / Translation file - pick one CSV or leave All.
    • Use spaces for underscores - the Krea/Anima toggle; turn it off if you want classic long_hair for Illustrious-style tag prompts.
    • Sort mode - match first, priority/count, or A-Z.

    Also handy: Suggestion count and List every match control how many candidates show, Append comma keeps your list tidy, and Popup color is there because apparently someone wanted cyan.

    Installing it

    The README's way - stop ComfyUI, then:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ukr8b3g-cmyk/Danbooru-Tag-JP-Assist.git
    

    Restart ComfyUI and hard-refresh the browser with Ctrl + F5 - the README is right to insist, since a stale UI is the #1 "why isn't it working." ComfyUI Manager will also grab it if you search "Danbooru Tag JP Assist." There are no pip dependencies and nothing to download by hand; the first launch just needs internet so the Danbooru CSV can pull down.

    Where people get burned

    • No popup at all. First check Settings → the extension is on by default but can be toggled off. Then hard-refresh. If you deleted or moved the tag files, no popup appears - the README is explicit that no tag file means no suggestions.
    • Popup shows but nothing matches. Your token doesn't hit any tag or Japanese alias in the loaded files. Try a shorter prefix, or check which files are selected.
    • The file dropdown is stale after you add your own CSV. Restart ComfyUI; the list is built at startup.
    • All mode feels laggy. It's loading multiple multi-megabyte CSVs into one list - that's expected. Pick a single file if you don't need the merge.

    It won't rewrite your prompting style, and for pure tag models you still want underscores. But as a crutch for the "what was that tag again" problem, it's quietly excellent.

    CategoryDanbooru Tag JP Assist

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING