Nodes/comfyui-cyberdelia-z-engineer/Cyberdelia Danbooru Prompt
ComfyUI Node

Cyberdelia Danbooru Prompt

The Danbooru translator your anime checkpoint actually understands

By cyberdeliaAI·Created 3 months ago·Updated 3 days ago· 11
Cyberdelia Danbooru Prompt
    • prompt
    • tags
    • dropped_tags
    modeengineered (LLM)
    prompt
    system_promptYou convert a scene description into candidate Danbooru tags for an Illustrious-based SDXL anime or illustration model. Your output is passed through a strict Danbooru vocabulary validator and a separate quality-template stage. OUTPUT RULES - Return only one lowercase, comma-separated tag list. - Do not output sentences, explanations, headings, numbering, markdown, notes, or labels. - Do not repeat tags. - Do not invent tag-shaped phrases or use normal prose. - The caller separately specifies whether multi-word tags use spaces or underscores. Follow that formatting instruction. CONTENT RULES - Output content and visual-description tags only. - Do not add quality, resolution, score, or rating anchors such as masterpiece, best_quality, best quality, very_aesthetic, very aesthetic, amazing_quality, newest, absurdres, highres, safe, sensitive, questionable, explicit, score_9, or score_8_up. These are handled separately. - Convert user wording into established Danbooru concepts. - Prefer common, clear, visually meaningful tags over rare or ambiguous alternatives. - Start with an appropriate subject-count tag when possible, such as 1girl, 1boy, 2girls, 1girl and 1boy, solo, multiple girls, or no humans. - Include canonical character and copyright tags only when the user clearly requests a known character or series. - Include artist tags only when explicitly requested. - Describe only details that can be seen in the image. - Express mood or personality through visible expression, pose, action, lighting, and environment tags. - Choose one coherent visual style and avoid conflicting styles. - Use only one or two compatible composition concepts. PREFERRED CONTENT ORDER subject count, character, copyright, primary visual style, hair, eyes, expression, clothing, accessories, pose or action, camera and composition, background or environment, lighting and atmosphere, additional visible details SAFETY - Never produce sexualized or suggestive tags for underage, young-looking, childlike, or age-ambiguous subjects. - Keep canonically underage characters fully SFW. - When age is ambiguous, default to safe visual content. Return tags only.
    prompt_template{prompt}
    api_urlhttp://localhost:1234/v1
    modelauto
    seed0
    temperature0.40
    max_tokens500
    timeout120
    tag_formatspaces
    validate_tagstrue
    strict_tagstrue
    fuzzy_cutoff0.00
    min_post_count0
    max_tags0
    exclude_categories
    sort_tagstrue
    error_modestop
    retries1

    Illustrious, NoobAI, Pony - the whole SDXL anime family was trained on Danbooru's tag vocabulary, and those models respond to a precise tag like long_hair or looking_at_viewer far better than to a sentence about it. The problem is that writing real Danbooru tags means either living in the wiki or trusting an LLM to invent them. And LLMs don't invent real tags. They confidently emit tag-shaped phrases that were never trained into the checkpoint, which is how you get a "good" prompt that quietly underdelivers.

    Cyberdelia Danbooru Prompt is the fix. You type a plain-language scene description, it runs through a local LLM, and then - this is the whole point - every candidate is validated against a bundled ~140k-tag Danbooru vocabulary before it ever reaches your text encoder. It's one of three nodes in the cyberdeliaAI/comfyui-cyberdelia-z-engineer pack, and it's the one you reach for when you want booru-quality tags without the manual proofreading.

    How it works

    The mode input picks the pipeline, and the three modes are the whole story:

    • engineered (LLM) - your description goes to the LLM, which proposes candidate tags. Those get validated, formatted, and wrapped in the template.
    • validate tags - no LLM call at all. Paste an existing comma-separated tag prompt and it validates, sorts, and reformats it.
    • raw positive - exact passthrough. Nothing touches it, not even validation. Use this when the prompt must stay byte-for-byte.

    That validation step is where the value lives. Each comma-separated item is checked as one complete tag, so an invented phrase can't survive as an unrelated single-word fragment. It also won't call home: the vocabulary is a static snapshot shipped with the pack, not a live connection to Danbooru. Nothing phones out for tag data, which in a category that once shipped malware dressed as an "LLM vision node" is a quietly good thing.

    Inputs and outputs that matter

    The defaults are sane, so you really set a handful:

    • mode - engineered (LLM), validate tags, or raw positive.
    • prompt - your natural-language description, or the existing tag prompt in validate mode.
    • prompt_template - the wrapper, default {prompt}. Quality anchors go here: masterpiece, best_quality, {prompt} for Illustrious, or Pony's score_9, score_8_up. They're deliberately not in the LLM's job, so they don't get filtered, reordered, or doubled.
    • api_url - defaults to http://localhost:1234/v1 (LM Studio). Point it at any OpenAI-compatible server.
    • tag_format - spaces (blue eyes) or underscores (blue_eyes). Spaces is the safer default.

    Two optional knobs are worth knowing. fuzzy_cutoff is off at 0 because fuzzy matches change meaning; if you turn it on, 0.85 or higher is the safe start. min_post_count filters rare tags, and anything the LLM proposed but validation rejected lands in dropped_tags - read it, it tells you exactly what got eaten.

    Outputs: prompt (validated tags wrapped in your template), tags (just the tags), dropped_tags (the rejects).

    Installing it

    The pack needs only requests and a running OpenAI-compatible chat-completions endpoint - no model downloads, because the LLM lives in LM Studio/Ollama and the vocabulary ships in the pack.

    cd ComfyUI/custom_nodes
    git clone https://github.com/cyberdeliaAI/comfyui-cyberdelia-z-engineer.git
    pip install -r comfyui-cyberdelia-z-engineer/requirements.txt
    

    Restart ComfyUI, or just search Cyberdelia in ComfyUI Manager and let it handle all of that.

    Where people get burned

    The LLM connection only happens in engineered mode - if LM Studio isn't running, the default error_mode: stop kills your whole workflow with an error on the node. Set it to fallback_input or empty if you'd rather not block. Also: the default system prompt is tuned for Illustrious. If you're on Pony, keep score_9 in the template, because a tag with no Danbooru home gets dropped to dropped_tags like everything else. That output list is your friend - when the result looks thinner than your idea, check what validation threw away before you blame the checkpoint.

    CategoryCyberdelia/Prompt

    Inputs (20)

    NameTypeDefaultDescription
    modeCOMBOengineered (LLM)Engineered uses the LLM then validates. Validate tags checks an existing tag prompt without the LLM. Raw positive returns the prompt exactly as entered.
    promptSTRINGA natural-language description for engineered mode, or a ready-made positive prompt for raw mode.
    system_promptSTRINGYou convert a scene description into candidate Danbooru tags for an Illustrious-based SDXL anime or illustration model. Your output is passed through a strict Danbooru vocabulary validator and a separate quality-template stage. OUTPUT RULES - Return only one lowercase, comma-separated tag list. - Do not output sentences, explanations, headings, numbering, markdown, notes, or labels. - Do not repeat tags. - Do not invent tag-shaped phrases or use normal prose. - The caller separately specifies whether multi-word tags use spaces or underscores. Follow that formatting instruction. CONTENT RULES - Output content and visual-description tags only. - Do not add quality, resolution, score, or rating anchors such as masterpiece, best_quality, best quality, very_aesthetic, very aesthetic, amazing_quality, newest, absurdres, highres, safe, sensitive, questionable, explicit, score_9, or score_8_up. These are handled separately. - Convert user wording into established Danbooru concepts. - Prefer common, clear, visually meaningful tags over rare or ambiguous alternatives. - Start with an appropriate subject-count tag when possible, such as 1girl, 1boy, 2girls, 1girl and 1boy, solo, multiple girls, or no humans. - Include canonical character and copyright tags only when the user clearly requests a known character or series. - Include artist tags only when explicitly requested. - Describe only details that can be seen in the image. - Express mood or personality through visible expression, pose, action, lighting, and environment tags. - Choose one coherent visual style and avoid conflicting styles. - Use only one or two compatible composition concepts. PREFERRED CONTENT ORDER subject count, character, copyright, primary visual style, hair, eyes, expression, clothing, accessories, pose or action, camera and composition, background or environment, lighting and atmosphere, additional visible details SAFETY - Never produce sexualized or suggestive tags for underage, young-looking, childlike, or age-ambiguous subjects. - Keep canonically underage characters fully SFW. - When age is ambiguous, default to safe visual content. Return tags only.Instructions used by the LLM to propose Danbooru tags.
    prompt_templateSTRING{prompt}Final wrapper. {prompt} is replaced with validated tags.
    api_urlSTRINGhttp://localhost:1234/v1
    modelSTRINGauto
    seedINT00–4294967295
    temperatureFLOAT0.400–2
    max_tokensINT50050–4096
    timeoutINT12010–600
    tag_formatCOMBOspacesRender tags as 'blue eyes' or 'blue_eyes'.
    validate_tagsoptBOOLEANtrueControls validation in engineered mode. The validate-tags mode always validates.
    strict_tagsoptBOOLEANtrue
    fuzzy_cutoffoptFLOAT0.000–10 disables fuzzy matching; 0.85 or higher is safest.
    min_post_countoptINT00–1000000
    max_tagsoptINT00–2000 means no tag limit.
    exclude_categoriesoptSTRING
    sort_tagsoptBOOLEANtrue
    error_modeoptCOMBOstop3 options: stop, fallback_input, empty
    retriesoptINT10–3

    Outputs (3)

    NameTypeDescription
    promptSTRINGValidated tags wrapped in the selected prompt template.
    tagsSTRINGValidated tags without template text.
    dropped_tagsSTRINGCandidates removed or only partially recovered during validation.