Nodes/ComfyUI_Eclipse/Danbooru Prompt Forge
ComfyUI Node

Danbooru Prompt Forge

A seed-repeatable Danbooru taglist picker that needs no API key

By r-vage·Created 10 months ago·Updated about 23 hours ago· 32
Danbooru Prompt Forge
    • text
    seed0
    featuresgeneral,replace_underscores
    prefix
    taglists_must_include1girl
    custom_prompt
    exclude_tag_categoriesartist, character_name, copyright, meta, speech_and_text, metadata_and_attribution, intentional_design_exposure, content_censorship_methods

    You know how Illustrious and NoobAI respond to real Danbooru tags way better than to sentences? Danbooru Prompt Forge exploits exactly that. It picks one taglist from a local, offline corpus and turns it into a finished prompt - deterministically, from a seed. Run it once, save the seed, and you get the same scene idea forever. That's the whole trick, and it works without touching the Danbooru API.

    It's an output node from r-vage/ComfyUI_Eclipse, the big Eclipse utility pack, sitting in the 🌒 Eclipse/ Danbooru category. And yes, the name is a bit of a lie in the good direction: there's no network call, no API key, no model download. The corpus ships with the pack.

    How it works

    Eclipse ships a ready-to-use Danbooru corpus derived from the rainlizard/ComfyUI-Raffle dataset - four rating files (taglists-general.txt, taglists-sensitive.txt, taglists-questionable.txt, taglists-explicit.txt) plus a categorized tag index, extracted from .defaults into ComfyUI_Eclipse/prompts/tag_lists/ on first startup. Each line looks like:

    7000000, 1720, 4girls, absurdres, long_hair, looking_at_viewer, ...
    

    That's post_id, score followed by the tags. The node filters candidates by your criteria, uses the seed to shuffle them deterministically, picks one, and strips off the post_id, score metadata. What you get out is the tag list itself.

    The features field is a serialized combo-chip bar. The rating chips (general, sensitive, questionable, explicit) choose which pools can participate - this picks source pools, it's not a content classifier, so mature pools can yield mature output. The other chips are replace_underscores (converts long_hair to long hair across the whole assembled prompt, after dedup), ignore_missing (forgiving required-tag matching), and categories (enables category filtering and shows the exclusion widget). New nodes default to general,replace_underscores.

    The inputs that matter

    • seed - the entire point. Same corpus + same settings + same seed = same result every time. Randomize per queue, or fix one for reproducible scenes.
    • taglists_must_include - only candidates containing every listed tag. Default 1girl. Each tag you add sharply shrinks the pool; the tooltip warns you for good reason.
    • prefix and custom_prompt - explicit tags at the start, and in the middle (after required, before generated). Both bypass category filtering.
    • exclude_tag_categories - only used when the categories chip is on; drops generated tags assigned to those categories. The default excludes artists, character names, copyright, meta, and friends, so you don't get sonetta_(reverse:1999) style noise polluting a generic scene.

    The single text output assembles prefix → required → custom → generated, deduplicated by first occurrence. Wire it into a positive prompt (or a CLIP text encode) and go.

    Installing it

    ComfyUI Manager, search "Eclipse" and install ComfyUI_Eclipse, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/r-vage/ComfyUI_Eclipse
    

    Then restart ComfyUI. The pack's requirements.txt (torch, numpy, Pillow, opencv-python, etc.) is mostly stuff ComfyUI already provides; only install it if you hit an import error. Note the big gotcha: Eclipse is the successor to the old RvTools_v2, and v4.0.0 removed all legacy nodes - an old RvTools_v2 workflow won't load as-is, but Eclipse ships a Workflow Migration Tool node to convert it.

    Where people get burned

    • The "no-matches error." If your required tags can't coexist in any candidate (or aren't in any enabled pool at all), the node errors rather than silently picking something random. ignore_missing only forgives tags missing from every pool; it won't relax tags that are found but can't coexist.
    • Tags are normalized, so white shirt and white_shirt are equivalent - one less thing to fight.
    • The categories chip needs categorized_tags.txt to be present. Leave it off and Prompt Forge runs straight from the rating files; that's also the setup that works if you never touch the LLM-categorization side of Eclipse at all.
    • Don't be surprised when a 1girl prompt comes back leaning heavily on the default pool - it's working as designed.

    For the "generate a random scene I can actually use" job on any Danbooru-trained model, this is the node. There's genuinely nothing else on comfy.icu doing seed-repeatable offline taglist selection quite like it.

    Category🌒 Eclipse/ Danbooru

    Inputs (6)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000Seed used to deterministically select a taglist from the filtered pool.
    featuresSTRINGgeneral,replace_underscoresChoose content-rating pools, missing required-tag handling, underscore formatting, and optional category filtering. Eclipse renders this serialized string as a combo-chip bar.
    prefixSTRINGAdd explicit comma- or newline-separated tags at the beginning of the assembled prompt.
    taglists_must_includeSTRING1girlOnly select taglists containing every listed tag. Adding tags can sharply reduce the available pool.
    custom_promptSTRINGAdd explicit comma- or newline-separated tags after the required tags and before the generated tags.
    exclude_tag_categoriesSTRINGartist, character_name, copyright, meta, speech_and_text, metadata_and_attribution, intentional_design_exposure, content_censorship_methodsWhen category filtering is enabled, remove generated tags assigned to these categories. Use category names from the bundled categories.txt file.

    Outputs (1)

    NameTypeDescription
    textSTRINGPrefix, required, custom, and generated tags assembled in order with first-occurrence deduplication.