Nodes/CSV Styler/CSV Styler
ComfyUI Node

CSV Styler

Your A1111 styles.csv, finally useful in ComfyUI

By Pun0110·Created about a year ago·Updated 10 months ago· 1
CSV Styler
    • positive
    • negative
    styles
    bypass_modefalse
    positive
    negative

    If you came over from AUTOMATIC1111's WebUI with a styles.csv full of curated presets you've built up over two years, you know the feeling: ComfyUI doesn't have a style dropdown, and you're pasting the same cinematic-lightning preamble into every workflow by hand. CSV Styler is the bridge. You hand it your positive and negative prompts, pick a style name from a dropdown, and it hands back the two prompts with the style's template applied. That's the whole job - and it's a job it does well.

    Mechanically it's the same trick as the core "Load Styles CSV" node that ships with ComfyUI, but with the wiring done for you. The core node spits out three separate strings and leaves you to figure out the concatenation - which, judging by how often new people get stuck on it in r/comfyui, is not obvious. CSV Styler takes both prompts as inputs and returns both styled, so it slots straight between your prompt text and the CLIP Text Encode node: positive out → the positive prompt input, negative out → the negative prompt input. Zero fuss.

    What you actually set

    The node surface is small, and that's a feature:

    • styles - the dropdown, populated from your styles.csv at startup. This is the entire point of the node.
    • positive / negative - your raw prompts, multiline.
    • bypass_mode - a boolean that passes both prompts through untouched. Handy for A/B-ing a style in and out without deleting it.

    The style format is A1111-style: rows of "name","positive template","negative template", quote-aware, so commas inside quotes survive. If a template contains the {prompt} keyword, your prompt is substituted into it. If it doesn't, the node just prepends "style, " to your prompt - the author's own comment in the source admits that comma is "mb unnecessary." If you want control over where your prompt lands, make sure the template uses {prompt}. Outputs are plain strings, one positive, one negative, ready for CLIP Text Encode.

    Getting it running

    Install is trivial: ComfyUI Manager, search "ComfyUI-CSV-Styler", or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Pun0110/ComfyUI-CSV-Styler.git
    

    Restart ComfyUI. There's no requirements.txt and no model download - the whole pack is one file using only os and re from the stdlib. The real dependency is your styles.csv, which must sit in the ComfyUI root directory next to main.py. The author points at Automatic1111-Fooocus-Styles for a 200+ style starter set - but flags that it contains typos and links their own fixes fork. Your existing A1111 styles.csv works too.

    Where people get burned

    The one real trap is in the file lookup. The code builds the path with os.getcwd() + "\\styles.csv" - a hardcoded backslash. On Windows, the author's dev environment, that's the correct separator and everything just works. On Linux and macOS that backslash is a literal character in the filename, so the file won't be found, and you'll see PT.CSVStyler: Error! No styles.csv found in the console with only "none" in the dropdown. The workaround on non-Windows is to create a file literally named \styles.csv in the directory you launch ComfyUI from (cp styles.csv '\styles.csv' - yes, really), or just run it on Windows. Launch location matters too: getcwd() is wherever you started ComfyUI, so start it from the root.

    Two more things to know. The "none" style isn't a dead end - it's a stub that passes your prompts through unchanged, which is why the dropdown never looks totally empty even when the file is missing. And the node prints every inbound/outbound prompt pair to the console, which sounds noisy but is genuinely useful for debugging why a style didn't apply the way you expected.

    Honest verdict: if you've never touched an A1111 styles.csv, this node probably isn't for you - modern prompting is less about canned style strings and more about block structure, and the negative prompt does nothing at all on some newer LLM-encoder models. But if you're an A1111 expat with a library of styles, this is the fastest way to bring them along, with no dependencies to babysit. Just be aware the file path bug means it's most at home on Windows.

    Categoryconditioning

    Inputs (4)

    NameTypeDefaultDescription
    stylesCOMBO1 options: none
    bypass_modeBOOLEANfalseBypass processing
    positiveSTRINGPositive prompt
    negativeSTRINGNegative prompt

    Outputs (2)

    NameTypeDescription
    positiveSTRING
    negativeSTRING