Nodes/NeuralBooru/NeuralBooru Validator
ComfyUI Node

NeuralBooru Validator

Feed it any tag soup — it returns only real Danbooru tags, no LLM required

By ChrisJohnson89·Created 2 months ago·Updated 2 months ago· 14
NeuralBooru Validator
    • prompt
    • dropped_tags
    • tags
    tags
    prompt_templatemasterpiece, best quality, amazing quality, 4k, very aesthetic, high resolution, ultra-detailed, absurdres, newest, scenery, {prompt}, BREAK, depth of field, volumetric lighting
    is_fallbackfalse
    validate_tagstrue
    strict_tagstrue
    fuzzy_cutoff0.00
    min_post_count0
    max_tags0
    exclude_categories
    template_presetcustom
    sort_tagstrue

    This is the node in the NeuralBooru pack that's worth having even if you never install LM Studio. NeuralBooru Validator is the validation half of the pipeline, split out on its own: you hand it comma-separated tags, it checks every one against the real Danbooru vocabulary, cleans them up, and wraps them in your model's quality template. No LLM involved anywhere.

    That makes it oddly general. Hand-typed tags, a WD14 tagger's output, a Generate Text node running Qwen3-VL, an external tagger's CSV dump - if it's text with commas, this node will turn it into tags your anime model actually knows. It exists because someone in the author's release thread pointed out that you can already run an LLM inside ComfyUI, so the LLM part of the pipeline isn't the scarce resource. Filtering is.

    How it works

    Under the hood it's the same whitelist the combined NeuralBooru node uses: a bundled list of ~140,000 real Danbooru tags (data/danbooru.csv, sourced from the a1111 tagcomplete project), each with a category and post count. Every candidate tag runs through the pipeline:

    1. Exact match - it exists as-is
    2. Alias remap - boobsbreasts, blondeblonde hair
    3. Word-form fix - smirkingsmirk, posingpose
    4. Sub-phrase recovery - real tags get pulled out of multi-word junk (black crop top yields crop top)
    5. Optional fuzzy match - off by default; 0.85–0.95 remaps near-miss typos
    6. Drop - whatever's left is filtered out (in strict mode) and reported

    Survivors get reordered into Danbooru-conventional prompt order - people counts, character, copyright, artist, general, meta - because booru-trained models are sensitive to that ordering, then dropped into the template you choose. Your template's quality tags are never validated; only the LLM's (or your) tags are.

    The inputs that matter

    • tags - comma-separated tags to validate. Wire it to raw_tags from NeuralBooruLLM, or type anything in.
    • template_preset - one-click quality wrappers for Illustrious, Pony (score_9, score_8_up...), Animagine XL, and NovaAnimeXL, or custom to use the prompt_template field.
    • strict_tags - True drops candidates that match no real tag; False lets them through raw. The heart of the node.
    • fuzzy_cutoff - 0 disables fuzzy matching; 0.8+ remaps near-misses. Handy when your tag source is sloppy.
    • min_post_count - drops tags rarer than N Danbooru posts. 0 keeps everything. Good for filtering obscure junk that a model will never have learned.
    • exclude_categories - comma-separated artist, character, copyright, meta to drop whole categories (say, if you don't want artist tags changing your style).
    • is_fallback - when True (set by NeuralBooruLLM when its call fails), validation is skipped and tags pass straight into the template. That's what keeps a workflow alive when the LLM server dies.

    The three outputs are prompt (templated, ready for CLIP Text Encode), tags (bare validated tags), and dropped_tags (what got filtered, comma-separated). Wire prompt straight into a positive CLIP encoder and you're done.

    Installation

    Same pack, same install, covers all three nodes. ComfyUI Manager, search NeuralBooru, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ChrisJohnson89/ComfyUI-NeuralBooru
    

    Restart ComfyUI, and it shows up under the NeuralBooru category. Zero Python dependencies - the whole pack is stdlib - and no model files to download. That's the whole appeal: no LLM, no GPU for text gen, nothing extra to run.

    Common issues

    • Tags keep getting dropped. That's the feature, but if it's too aggressive your source is producing too much non-vocabulary. Turn on fuzzy_cutoff around 0.9, or flip strict_tags off.
    • Everything disappears at once. Check min_post_count - if you set it high, rare-but-real tags (including a niche character you want) get culled. Leave it at 0 unless you know you need it.
    • Category filtering not working. exclude_categories takes the names artist, character, copyright, meta or the numeric category codes. Unknown names are ignored with a console warning.
    • A tag is missing that should exist. The vocabulary is a snapshot from the tagcomplete project, so very new Danbooru tags won't resolve yet - the roadmap has a refresh script on the way.

    If you've got a tag pipeline already and just want to know what your model actually understands, this is the one node from the pack you should grab.

    CategoryNeuralBooru

    Inputs (11)

    NameTypeDefaultDescription
    tagsSTRINGComma-separated tags to validate. From NeuralBooruLLM or typed manually.
    prompt_templateSTRINGmasterpiece, best quality, amazing quality, 4k, very aesthetic, high resolution, ultra-detailed, absurdres, newest, scenery, {prompt}, BREAK, depth of field, volumetric lightingFinal prompt wrapper; {prompt} is replaced with the validated tags. If {prompt} is missing, tags are appended.
    is_fallbackoptBOOLEANfalseWhen True (set by NeuralBooruLLM on error), skip validation and pass tags through into the template. Reproduces the original node's use_input_text fallback.
    validate_tagsoptBOOLEANtrueCheck every tag against the real Danbooru vocabulary.
    strict_tagsoptBOOLEANtrueDrop candidates that match no real tag. Off keeps them raw.
    fuzzy_cutoffoptFLOAT0.000–1Remap near-miss tags by similarity (0.8+ recommended). 0 disables fuzzy matching.
    min_post_countoptINT00–1000000Drop tags with fewer Danbooru posts than this. 0 keeps all.
    max_tagsoptINT00–200Keep at most this many tags. 0 means no limit.
    exclude_categoriesoptSTRINGTag categories to drop, comma-separated: artist, character, copyright, meta, general.
    template_presetoptCOMBOcustomQuality-tag wrapper for common model families. custom uses the prompt_template field above.
    sort_tagsoptBOOLEANtrueReorder tags Danbooru-style: people counts, character, copyright, artist, general, meta. Booru-trained models respond to this order.

    Outputs (3)

    NameTypeDescription
    promptSTRINGValidated tags wrapped in the prompt template, for your CLIP encoder.
    dropped_tagsSTRINGCandidates that failed validation, comma-separated.
    tagsSTRINGThe validated tags alone, without the template.