ComfyUI Node

Scenario Prompt

Build booru tag prompts like a character sheet, autocomplete included

By Ludobico·Created 3 years ago·Updated about a year ago· 19
Scenario Prompt
    • text
    Basemasterpiece, best_quality
    Character
    Face
    Body_type
    Fashion
    Accessory
    Action
    Point_of_view
    Background
    Light

    The name is a slight lie. ScenarioPrompt doesn't generate anything and it doesn't call any API. It's a prompt organizer: ten labeled text boxes that stitch themselves into one comma-separated prompt, plus a built-in autocomplete that suggests booru tags from the NovelAI tag list as you type. If you've ever written a character in a single long text field and then realized three renders in that you never described the lighting, this is a friendly fix.

    Why you'd reach for it

    This is a node for the anime-tag workflow - Danbooru vocabulary, NovelAI-style structured prompts, models like Illustrious, NoobAI, or Pony in anime mode. When you build a prompt in one wall of tags, everything bleeds together and you lose track of what you've covered. ScenarioPrompt gives you slots: Character, Face, Body_type, Fashion, Accessory, Action, Point_of_view, Background, Light, and a mandatory Base slot. It's the same instinct as the block-structure advice floating around the community: keep the parts separate and the model stops confusing who's wearing what.

    Honest take: if you already know your tags, this is a nice-to-have, not a must-have. Its real draw is the autocomplete. The tag lists ship inside the pack, so you don't have to hold the whole booru taxonomy in your head - you type "cherry" and the dropdown suggests cherry_blossoms.

    How it works

    The mechanism is almost insultingly simple. On the Python side, the node joins whatever fields are non-empty with , and then runs a regex that collapses doubled commas into one. That's the whole node. The clever part lives in the front end: a JavaScript extension fetches the bundled tag JSONs through a /ludobico/autocomplete endpoint ComfyUI's own server provides, and each field gets a dropdown filtered as you type. Click a suggestion and it swaps in for the last comma-separated word.

    One thing worth knowing: the tags themselves are English booru tags (the sample lists in the pack include bare_shoulders, arm_cutout, solo_focus, Volumetric_lighting), but the descriptions next to them are in Korean. Fine to use; just don't expect English tooltips.

    The inputs that matter

    Only one input is required:

    • Base - defaults to masterpiece, best_quality. This is the classic NovelAI-derived quality-tag block. It genuinely works on anime SD 1.5/SDXL derivatives that were trained on it, but it does nothing on modern LLM-encoded models, so if you're prompting Flux or an Anima-class model, this default is a trap you'll want to clear.

    The other nine - Character, Face, Body_type, Fashion, Accessory, Action, Point_of_view, Background, Light - are all optional multiline strings. Leave any empty and they're simply dropped.

    The node has exactly one output: text (a STRING). Wire it into a CLIP Text Encode (Prompt) node - but only after checking Convert text to input on that node, otherwise there's no socket to plug into. The README calls this out explicitly, and it's the most common way people bounce off this node. If you'd rather eyeball the composed prompt before rendering, feed the output into the Show Text widget from ComfyUI-Custom-Scripts instead.

    Installation

    cd path/to/ComfyUI/custom_nodes/
    git clone https://github.com/Ludobico/ComfyUI-ScenarioPrompt.git
    

    Then restart ComfyUI. ComfyUI Manager can also install it - search "ScenarioPrompt". No extra Python dependencies (it leans on aiohttp and PromptServer, which ComfyUI already ships), and no model downloads; the tag lists ride inside the pack's data/ folder.

    Gotchas

    • Autocomplete won't show up. The extension loads its tag data on startup, so a fresh clone needs a full ComfyUI restart before the dropdowns appear.
    • Forgot "Convert text to input." No wire target on CLIP Text Encode, prompt goes nowhere. It's the README's own warning, and it's real.
    • Scope. This is an anime/danbooru-tag tool through and through. For natural-language prompting on newer models, you'll get more from a well-structured paragraph than from this field-by-field splitter.
    • Small, quiet pack. No big community signal behind it - you're in early-adopter territory, which is fine for a utility node this simple. If something breaks, the fix is usually the restart, not a forum hunt.
    Categoryutils

    Inputs (10)

    NameTypeDefaultDescription
    BaseSTRINGmasterpiece, best_quality
    CharacteroptSTRING
    FaceoptSTRING
    Body_typeoptSTRING
    FashionoptSTRING
    AccessoryoptSTRING
    ActionoptSTRING
    Point_of_viewoptSTRING
    BackgroundoptSTRING
    LightoptSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING