Nodes/CNtranslator/🇨🇳 Translator
ComfyUI Node

🇨🇳 Translator

The Chinese-prompt translator that needs no API key — and the reason it exists

By SleeeepyZhou·Created 2 years ago·Updated about a year ago· 7
🇨🇳 Translator
    • output
    input
    CN2ENtrue

    The name tells you exactly who this is for: it's the "🇨🇳 Translator" node, and it exists because of the Great Firewall. The pack's own pyproject.toml says it outright - "Because of the network firewall in Chinese Mainland, many translation APIs cannot be used normally." Google, Bing, DeepL are all flaky from mainland networks, so this node routes through a domestic translation service that isn't blocked. No API key, no account, no config. If you're a mainland user who wants a CN→EN prompt without leaving ComfyUI, this is the smallest thing that does it. If you're anywhere else with a working translator tab open, it's not a must-have - but it's still the handiest way to flip a prompt inside the graph.

    What it actually does

    Wire a string in, get a string out. The input accepts any STRING from another node, and the CN2EN boolean picks the direction: on (the default) is Chinese→English, off is English→Chinese. The translated text comes out of output as a STRING, ready to feed a CLIP Text Encode node or anything else that takes text. Because it's marked as an output node, ComfyUI also renders the result right on the node - you can read the translation before it goes anywhere.

    How it works - the part to care about

    Under the hood it splits your text on commas - both the ASCII , and the full-width Chinese - then fires up to 50 parallel POST requests at a free third-party endpoint (xiangtatech.com), collects the translated chunks, and rejoins them with commas. Only dependency is requests, which ComfyUI already ships. No models to download, no heavy install.

    That comma-splitting is the gotcha. It's built for tag-style prompts: 女孩, 长发, 樱花 becomes three short translations, which works great. Natural sentences with commas get chopped into fragments and translated without context, which comes out rough. And since each tag is its own request, a failed one silently drops that piece from the output - you get a shorter result and no warning. The endpoint is a free service run by an unknown third party, so treat it as best-effort: it can be slow, flaky, or gone tomorrow. It also means every run sends your prompt text to someone's server. Worth knowing if you'd rather your prompts never leave the machine.

    The trap for beginners

    input is marked forceInput - you cannot type into it. First glance shows an empty node with no text box, and people assume it's broken. You need a source node feeding it. That's why this pack ships TextShow: paste your Chinese into TextShow, then wire TextShow → CNtranslator → CLIP Text Encode, and Queue.

    Install

    Either route takes a minute. ComfyUI Manager - search "CNtranslator" and hit install, then restart. Or the manual way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SleeeepyZhou/ComfyUI-CNtranslator
    

    Restart ComfyUI and you're done. No extra pip installs, no keys to paste, nothing to configure.

    Honest verdict: this is a tiny, niche pack - zero impressions on comfy.icu and no community chatter to speak of, last touched in 2025, so don't expect active maintenance. But as a free, keyless CN→EN prompt translator for mainland users it does the job, and for anyone else it's a legitimately convenient way to translate a prompt mid-graph. Just don't build anything critical on a third-party free API.

    Categoryutils

    Inputs (2)

    NameTypeDefaultDescription
    inputSTRING
    CN2ENBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    outputSTRING