多风格合并节点
Merging A1111-style styles the lazy way
- combined positive
- combined negative
If you ever used A1111, you remember the styles dropdown - a huge list of "photography | cinematic", "anime | watercolor" presets where one click fills both your prompt and your negative. ComfyUI never shipped that, so people hack it back in with a CSV. This node is that hack, upgraded: it lets you pick up to five presets at once, layers your own text on top, and hands you one clean positive and one clean negative string to feed your sampler.
The best part is the one nobody expects: type your extra prompts in Chinese and it translates them to English for free, no API key, no account. The name of that feature is not a lie.
What it actually does
The pack ships a styles.csv with about 307 presets. Each row is name, prompt, negative_prompt. The names are organized in Chinese - 摄影 (photography), 摄影 | 航拍 (aerial), and so on - but the actual prompt text is English, because that's what your checkpoint eats.
The node reads that CSV, grabs whatever styles you select, and concatenates their prompt columns with a separator (default comma, so ", "). Then it sticks your positive_prefix on the front and positive_suffix on the back of the positive side, does the same for the negatives, and returns the two finished strings. That's the whole mechanism - no models, no VRAM, nothing clever. A text joiner with a curated library.
The inputs that matter
Honestly, you set three things:
- style1 through style5 - the presets.
style1is always on;style2–style5default to 无 (none), so leave them alone unless you actually want to stack. Stacking works surprisingly well when the styles share a vibe, and produces mush when they don't. You've been warned. - positive_prefix / positive_suffix / negative_prefix / negative_suffix - your own text. These are where the Chinese auto-translate applies. Note the scope: it translates these fields, not the preset prompts (those are already English) and not anything you type into the CSV yourself.
- separator - 逗号/空格/换行 (comma / space / newline). Comma is right for tag-style SDXL/Illustrious prompts. If you're running Flux or another LLM-encoded model, sentence-style prompts read better with a space or newline separator - those models treat the prompt as an instruction, not a token bag.
Also worth knowing: csv_file and refresh. The dropdown lists every CSV the pack finds - in your ComfyUI root (styles.csv), a csv_styles/ folder, or anywhere under custom_nodes/. After you drop in a new CSV, tick refresh to reload it; the widget list won't update on its own.
Outputs: combined positive and combined negative, both plain STRING.
Wiring it up - the trap everyone hits
The outputs are strings, and the CLIP Text Encode node's prompt field is a widget, not an input socket. So people drag the wire over and nothing snaps. Right-click the prompt field on your CLIP Text Encode and choose Convert widget to input, then wire it. This is the single most common "Load Styles CSV doesn't work" complaint on r/comfyui, and the fix is always this. If you have a conditioning concat node you can also encode both and merge those instead.
Install
ComfyUI Manager - search "ComfyUI Styles CSV Loader (ZH)" or the repo name - or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/assemly/comfyui-styles_csv_loader_zh
Restart ComfyUI. It shows up under the styles_csv_loader category in the node menu, displayed as 多风格合并节点. Manager will pull requests for you. The translation layer optionally wants googletrans==4.0.0-rc1 and/or deep-translator - both are pinned in the pack's requirements.txt.
Common gotchas
- Styles don't appear, or the CSV won't load. Check where you put the file. The node scans specific places, not the whole disk - root
styles.csv,csv_styles/, or insidecustom_nodes/. Then hitrefresh. If the console prints "Error loading styles.csv", it tried every encoding from UTF-8 to GB18030 and gave up - resave the file as UTF-8. - The
googletrans==4.0.0-rc1pin. That specific release is famously flaky on modern Python - it throws a crypticAttributeErroron many current installs. If translate silently fails, installdeep-translatorand let it take the fallback slot; or uninstall googletrans and let the built-in dictionary do a rough job. - Chinese text left untranslated. Translation only runs on the four prefix/suffix fields. If you pasted Chinese into the CSV's prompt column, it goes through untouched.
Small pack, quiet author, but this one pulls real weight if you came from A1111 and miss your style library. Five presets, one wire, done.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| csv_file | COMBO | custom_nodes/comfyui-styles_csv_loader_zh/styles.csv | 1 options: custom_nodes/comfyui-styles_csv_loader_zh/styles.csv |
| refresh | BOOLEAN | false | — |
| 中文翻译 | BOOLEAN | true | — |
| style1 | COMBO | 307 options: 无风格, ||| 摄影, 摄影 | 航拍, 摄影 | 建筑, 摄影 | 黑白, 摄影 | 电影感, +301 | |
| style2 | COMBO | 无 | 308 options: 无, 无风格, ||| 摄影, 摄影 | 航拍, 摄影 | 建筑, 摄影 | 黑白, +302 |
| style3 | COMBO | 无 | 308 options: 无, 无风格, ||| 摄影, 摄影 | 航拍, 摄影 | 建筑, 摄影 | 黑白, +302 |
| style4 | COMBO | 无 | 308 options: 无, 无风格, ||| 摄影, 摄影 | 航拍, 摄影 | 建筑, 摄影 | 黑白, +302 |
| style5 | COMBO | 无 | 308 options: 无, 无风格, ||| 摄影, 摄影 | 航拍, 摄影 | 建筑, 摄影 | 黑白, +302 |
| positive_prefixopt | STRING | — | |
| positive_suffixopt | STRING | — | |
| negative_prefixopt | STRING | — | |
| negative_suffixopt | STRING | — | |
| separatoropt | COMBO | 逗号 | 3 options: 逗号, 空格, 换行 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| combined positive | STRING | — |
| combined negative | STRING | — |