Nodes/ComfyUI-Addoor/🌻 CSV Translator
ComfyUI Node

🌻 CSV Translator

Translate a column of a prompt sheet in place

By Eagle-CN·Created 2 years ago·Updated about a year ago· 75
🌻 CSV Translator
    • updated_csv_path
    • seed
    csv_path
    source_column1
    target_column2
    source_lang
    target_lang
    translate_first_rowfalse
    seed0

    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, or zh-CN for the source; zh-CN or en for 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.

    Category🌻 Addoor/CSV

    Inputs (7)

    NameTypeDefaultDescription
    csv_pathSTRING
    source_columnINT11–1000
    target_columnINT21–1000
    source_langCOMBO3 options: auto, en, zh-CN
    target_langCOMBO2 options: zh-CN, en
    translate_first_rowBOOLEANfalse
    seedINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    updated_csv_pathSTRING
    seedINT