Nodes/ComfyUI-FeiFei/Style Selector EX
ComfyUI Node

Style Selector EX

780 styles, one dropdown, and a random button

By aifeifei798·Created about a month ago·Updated about 12 hours ago· 3
Style Selector EX
    • positive_prompt
    • negative_prompt
    ◄prompt1A cute Japanese idol girl, portrait, masterpiece, best quality►
    ◄prompt2Underwater photography style (shooting through glass), twin tail girl submerged in water, cheeks puffed out blowing bubbles, twin tails floating freely in the water, dreamy and soft, cute expression.►
    ◄prompt3Japanese gravure idol photography, realistic human, Fujifilm Provia color grading, soft pastel tones, high key lighting, clear skin texture, cinematic bokeh, 8k, highly detailed, natural skin, gorgeous, sharp focus, masterpiece, best quality.►
    ◄style_name▾►
    ◄juese_names▾►
    ◄random_stylefalse►
    ◄prompt4—►
    ◄prompt5—►
    ◄prompt6—►
    ◄prompt7—►

    This is a prompt-assembly node, and its value is entirely in the two data files it reads: around 780 style templates and 56 character templates. You write three text boxes, pick a character, pick a style, and get one positive prompt and one negative prompt out.

    The mechanism is template substitution, and it's worth understanding exactly, because it decides whether the node helps you or fights you.

    How the assembly works

    prompt1, prompt2, prompt3 are multiline text boxes; prompt4–prompt7 are optional link-only sockets (forceInput, no textbox) that are appended after the three boxes in order. All seven are joined with spaces, skipping anything empty - which means the node composes cleanly with the rest of the pack: wire Prompt Director's positive_prompt into prompt4 and your LLM-generated shot becomes the base text that the style wraps.

    Then, in order:

    1. Character. The entry matching juese_names contributes a prompt appended after your text, and a negative prompt that seeds the node's negative output. If the entry is (None), nothing happens. Older workflows carrying Chinese or Japanese character names resolve through an alias table before the lookup, so they don't silently miss.
    2. Style. The style template's {prompt} placeholder is replaced with the string you just built. A template with no {prompt} in it defaults to just {prompt}. The negative side works the same way when the template carries {prompt}; otherwise the style's fixed negative terms get the character's negative appended.
    3. Cleanup. Double commas and stray whitespace get collapsed, so you don't end up with girl, , , masterpiece.

    Outputs are positive_prompt and negative_prompt. Straight into two CLIP Text Encodes.

    Pick (None) on either dropdown to skip that stage, which is how you use the node as pure plumbing - styles without a character, or a character with no style.

    random_style and the caching detail

    Flip random_style on and the node picks a random style from the eligible list each time it runs, printing the name it chose to the console so you can find the one you liked. (None) is excluded from the pool, since randomly removing your style is not a feature.

    The interesting part is that randomisation only works because the node overrides ComfyUI's cache: it implements IS_CHANGED and returns a value that always differs while random_style is true, so the engine re-executes rather than serving the previous result. Without that, ComfyUI's aggressive caching would hand you the same "random" style on every run and you'd spend an evening convinced the node was broken. It's the same always-dirty trick that any random picker, clock or counter node needs.

    The cost is the flip side: a node that must re-run every time defeats the cache behind it, so leave random_style off when you're gearing up for a long batch and want ComfyUI to skip work it already did.

    The data files

    Styles and characters live in style_data.py and juese_data.py. Adding your own is editing a Python list of dicts - a name plus prompt and optional negative_prompt, with {prompt} marking where your text goes. Duplicate names are deduped by first appearance at import (the bundled data had duplicates), which also means a name you think you renamed might still resolve to the first entry with that label.

    That's the honest caveat with 780 styles: the names are English now (the node is a port of a Chinese-language original, hence the _zh_ex filename), but they're a curated personal collection, not a documented taxonomy. Browse them, find the handful that fit your look, and save the workflow with those. Treating the list as a library to be exhaustive about is a waste of an afternoon.

    Install

    ComfyUI Manager → ComfyUI-FeiFei, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aifeifei798/ComfyUI-FeiFei.git
    # restart ComfyUI, then look under the FeiFei category
    

    No models, no downloads. The templates are plain text in the repo.

    Where it goes wrong

    • Prompts come out comma-soupy. Your three boxes are being concatenated in full, then the style template wraps the result. If prompt3 is already a 90-word baked-in style paragraph, don't also add a style - you're stacking two styles.
    • The style seems to do nothing. You picked a style whose template lacks {prompt}, or the character entry is (None), or the whole result got overwritten by an upstream connection into prompt4. Check what actually landed in the output with a Show Text node before blaming the template.
    • Quality-tag spam on an LLM-encoded model. The bundled templates lean on SDXL/Illustrious vocabulary - masterpiece, best quality, 8k. On those checkpoints that's doing real work. On Z-Image, Klein, or anything whose encoder reads prompts as instructions, those tokens are dead weight and the tags do measurably nothing. This node is for the tag-based side of your workflow.
    • A workflow from an older version shows different styles. Template lists change between releases; pick the style once on the current version and re-save.
    CategoryFeiFei

    Inputs (10)

    NameTypeDefaultDescription
    prompt1STRINGA cute Japanese idol girl, portrait, masterpiece, best quality—
    prompt2STRINGUnderwater photography style (shooting through glass), twin tail girl submerged in water, cheeks puffed out blowing bubbles, twin tails floating freely in the water, dreamy and soft, cute expression.—
    prompt3STRINGJapanese gravure idol photography, realistic human, Fujifilm Provia color grading, soft pastel tones, high key lighting, clear skin texture, cinematic bokeh, 8k, highly detailed, natural skin, gorgeous, sharp focus, masterpiece, best quality.—
    style_nameCOMBO780 options: (None), Atmospheric Perspective (Tyndall Effect), FeiFei Light Art - Universal, FeiFei Light Art - Krea2, Dreamy Bokeh (Wide Aperture), Rembrandt Lighting (Classic Portrait), +774
    juese_namesCOMBO56 options: (None), Arina Hoshino, Classic Idol - Universal, K-pop idol, new york blond model, blonde woman, +50
    random_styleBOOLEANfalse—
    prompt4optSTRING—
    prompt5optSTRING—
    prompt6optSTRING—
    prompt7optSTRING—

    Outputs (2)

    NameTypeDescription
    positive_promptSTRING—
    negative_promptSTRING—