Nodes/ComfyUI_Lam/风格选择器
ComfyUI Node

风格选择器

SDXL style presets, A1111-style, with a clickable tag UI

By yanlang0123·Created 2 years ago·Updated about a month ago· 76
风格选择器
    • 正向提示词
    • 反向提示词
    • i项风格名称
    prompt
    style_type
    negative_prompt
    i

    If you came to ComfyUI from Automatic1111, you remember SDXL styles: named presets that wrap your prompt in a template and append a matching negative. "anime artwork {prompt}. anime style, key visual, vibrant, studio anime" - that kind of thing. StyleSelecto (风格选择器, "style selector") brings that exact concept to ComfyUI with six bundled style collections loaded from JSON files, plus a clickable tag UI in the node itself.

    How it works

    The pack ships a styles/ folder containing sdxl_styles_sai, sdxl_styles_marc_k3nt3l, sdxl_styles_diva, sdxl_styles_twri, sdxl_styles_fooocus, and sdxl_styles_mre - the well-known community SDXL style sets. The SAI collection is the official Stability-style list; the others are the familiar community packs. Each entry is a name, a positive template with a {prompt} placeholder, and a negative. The node scans the folder for any *styles*.json, so dropping in another collection just makes it appear in the style_type dropdown.

    For each style it applies two transformations:

    • positive: prompt = template.format(prompt=prompt) - your text gets nested inside the style's template.
    • negative: the style's negative_prompt gets comma-appended to whatever you already passed in.

    The inputs that matter:

    • prompt - your base prompt, fed into the template.
    • style_type - which style collection the dropdown draws from.
    • negative_prompt - optional; the style negatives get appended to it.
    • i - optional INT. Force a single style by its index and get its name back as the third output. Skip it to apply every style you've selected.

    There's also a hidden styles field that the pack's frontend (StyleSelecto.js) fills with the comma-separated list of styles you clicked in the node's UI. That's the practical flow: click tags, queue, done. The node also serves a /lam/getStyles endpoint that pairs style names with Chinese labels from zh_CN.json, which is why the UI reads comfortably even if you don't read Chinese.

    The three outputs are 正向提示词 (positive prompt), 反向提示词 (negative prompt), and i项风格名称 (the name of the style at index i). Wire the first two into CLIPTextEncode's positive and negative inputs and you're done.

    The honest caveat

    These templates assume SDXL-era prompting. On an LLM-encoded 2026 model - Flux-lineage, Z-Image, Anima - the style vocabulary was never trained in, and a template like "cinematic film still" mostly does nothing useful while bloating your prompt. Keep this node for SDXL and its fine-tunes (Illustrious, Pony, etc.), where it works exactly as advertised.

    One more trap: if you click five styles and don't set i, all five templates get applied in sequence, and the negatives stack up into a long comma chain. That's sometimes what you want (nested styles) and sometimes just clutter - if the result looks overstuffed, use i to pick one.

    Installing it

    Part of the ComfyUI_Lam pack. Install via ComfyUI Manager (search "ComfyUI_Lam") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yanlang0123/ComfyUI_Lam
    

    Restart ComfyUI after. The styles JSON ships in the repo, so no downloads are needed for this node - the only cost is the pack's heavy overall requirements.txt (opencv, insightface, librosa, and friends) that its install.bat pulls in.

    Troubleshooting

    If the tag UI renders empty, the styles folder didn't load - check that styles/*.json is intact inside the pack. If your negative prompt suddenly got huge, that's the style negatives appending - expected behavior, just trim your selection. And remember the i-based single pick bypasses the UI selection entirely; pick one mechanism or the other, or you'll be surprised which style came out.

    Categorylam

    Inputs (4)

    NameTypeDefaultDescription
    promptSTRING
    style_typeCOMBO6 options: sdxl_styles_sai, sdxl_styles_fooocus, sdxl_styles_twri, sdxl_styles_marc_k3nt3l, sdxl_styles_mre, sdxl_styles_diva
    negative_promptoptSTRING
    ioptINT

    Outputs (3)

    NameTypeDescription
    正向提示词STRING
    反向提示词STRING
    i项风格名称STRING