Nodes/SDXL Prompt Styler/SDXL Prompt Styler
ComfyUI Node Runs on cloud

SDXL Prompt Styler

The 107-style dropdown that does the prompt-engineering for you

By twri·Created 3 years ago·Updated 2 years ago· 921
SDXL Prompt Styler
    • text_positive
    • text_negative
    text_positive
    text_negative
    style
    log_prompttrue
    style_positivetrue
    style_negativetrue

    Somewhere between your prompt box and the checkpoint loader, every "wow" SDXL workflow had one of these. The SDXL Prompt Styler is a pure text-in, text-out utility node: you type a prompt, pick a style from a dropdown of 107 presets, and it hands back a rewritten prompt plus a ready-made negative. The name is a bit of a lie - it doesn't call any API, needs no key, and runs zero model code. It's a string macro with very good defaults, and that's exactly why it's still everywhere.

    What it actually does

    The node reads JSON template files that ship in the pack folder. Each template has a name, a prompt field with a {prompt} placeholder, and a negative_prompt field. Drop in text_positive = "a futuristic pop up tent in a forest", pick sai-enhance, and you get back breathtaking a futuristic pop up tent in a forest . award-winning, professional, highly detailed. If you also supplied a negative, it gets comma-joined onto the template's negative; if you left the box empty, you just get the template's negative on its own.

    The 107 styles split into three JSON files: a base template that's a pass-through, 17 sai-* styles lifted from Stability's official SDXL style list (enhance, cinematic, anime, and friends), and the ~89 twri-* and ads-*/artstyle-* styles the author hand-wrote. That's a real range - photography moods, watercolor, comic book, luxury advertising - and each one brings a matched negative, which is the part people copy by hand from Discord prompts and forget to do.

    The inputs that matter

    Only a few, and they're self-explanatory:

    • text_positive / text_negative - your base prompts. Both multiline.
    • style - the dropdown of 107 templates.
    • style_positive / style_negative - bypass toggles added in early 2024. Flip one off and that side passes through unstyled. Handy for A/B tests or when a style's negative fights your own.
    • log_prompt - prints every input and output to the console. Note it defaults to on here, so your terminal gets chatty until you switch it.

    Outputs are just text_positive and text_negative (both STRING), which wire straight into a CLIPTextEncode. The node doesn't care what model you're feeding - it never sees one - so it also plays fine in Flux pipelines; the styles just happen to be written for SDXL vocabulary.

    Installing it

    Either way takes about a minute and pulls nothing else in - there are no pip dependencies and no model files to download:

    cd ComfyUI/custom_nodes
    git clone https://github.com/twri/sdxl_prompt_styler.git
    # restart ComfyUI
    

    Or skip the terminal: open ComfyUI Manager → Custom Nodes Manager, search "SDXL Prompt Styler", and hit Install. Restart, and both nodes from the pack appear under the utils category.

    Where people get burned

    The big one is the 77-token ceiling. On SDXL-class models both text encoders truncate prompts past 77 tokens, and a verbose style like the advertising ones eats a third of that budget before you add a word. Long prompts plus a heavy style silently drops the tail - keep prompts tight if the last tokens matter.

    Second: adding your own styles is easy but the README's "styles directory" note is stale. The current code scans for every .json file in the pack folder itself, so drop your template file next to sdxl_prompt_styler.py and restart. Duplicate style names get a suffix appended rather than failing, but it's worth keeping names unique to avoid confusion.

    And one honest caveat for 2026 users: on distilled, guidance-free models running at CFG 1, the negative prompt this node so helpfully builds does nothing at all - it's never even computed. On real SDXL and its finetunes it still earns its keep. This isn't the flashiest node in the graph, but for consistent batch styling it's the one I'd actually reach for.

    Categoryutils

    Inputs (6)

    NameTypeDefaultDescription
    text_positiveSTRING
    text_negativeSTRING
    styleCOMBO107 options: ads-advertising, ads-automotive, ads-corporate, ads-fashion editorial, ads-food photography, ads-gourmet food photography, +101
    log_promptBOOLEANtrue
    style_positiveBOOLEANtrue
    style_negativeBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    text_positiveSTRING
    text_negativeSTRING