🌻 CSV Translator
Translate a column of a prompt sheet in place
- updated_csv_path
- seed
Reads a column of a CSV, translates it, and writes the result into another column of the same file. The obvious use is a bilingual prompt sheet: keep your prompts in English in column one, run this, and get the Chinese versions in column two - or the other way around.
Why you'd want it
Translation is more useful in this world than it looks. This is a Chinese-authored pack, and there's a real reason English/Chinese matters here: several of the strongest recent open models - Qwen-Image, Z-Image, Wan - come out of Alibaba's Tongyi lab and were trained with a bilingual text encoder, which makes Chinese prompting a genuine adherence lever, not a novelty. Having a fast way to translate a whole sheet of prompts between languages lets you experiment with which phrasing the model actually follows better. It's also just handy for building bilingual caption datasets or localizing a prompt library you found online.
How it works
You give it a CSV path and tell it which column holds the source text and which column should receive the translation. It reads each row's source cell, translates it from source_lang to target_lang, and writes the output into the target column - saving the updated file back to disk. translate_first_row decides whether the header row gets translated too (usually you leave it off so your column titles stay put).
The inputs that matter
- csv_path - the file to translate. It gets modified in place, so mind your original.
- source_column / target_column - which column to read from and write to. Note these are 1-indexed here (source defaults to 1, target to 2).
- source_lang / target_lang -
auto,en, orzh-CNfor the source;zh-CNorenfor the target. - translate_first_row - translate the header row or leave it alone.
Outputs are updated_csv_path (the file it just wrote - wire this into a CSV Reader to use the results) and a seed pass-through.
Common issues
Two things to keep in mind. First, it writes back to the same file, so keep a backup of your original CSV before running it on anything you care about - a bad run overwrites your source column layout. Second, translation happens through a translation engine, which in practice means it needs network access and can rate-limit or fail on large sheets; if a big file stalls or comes back partly translated, run it in smaller chunks. And remember the columns are 1-indexed - source_column 1 is the first column, which trips up anyone used to zero-based counting elsewhere in the pack.
Installing ComfyUI-Addoor
ComfyUI-Addoor (葵花宝典) is a utility pack from developer Eagle-CN with several CSV-focused nodes. ComfyUI Manager: Install Custom Nodes → search "ComfyUI-Addoor" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Eagle-CN/ComfyUI-Addoor.git
cd ComfyUI-Addoor
pip install -r requirements.txt
Restart and find it under 🌻 Addoor / CSV.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| csv_path | STRING | — | |
| source_column | INT | 11–1000 | — |
| target_column | INT | 21–1000 | — |
| source_lang | COMBO | 3 options: auto, en, zh-CN | |
| target_lang | COMBO | 2 options: zh-CN, en | |
| translate_first_row | BOOLEAN | false | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| updated_csv_path | STRING | — |
| seed | INT | — |