AC_百度翻译
Translate prompts in-graph with Baidu's API — you'll need your own key
- STRING
If you write prompts in Chinese (or you keep finding Chinese prompt packs you want to steal from), this is the node that gets them into English without you leaving the graph. AC_百度翻译 is the Baidu translate wrapper inside the ComfyUI-AC_FUNV2.0 toolbox: you paste text in, it calls Baidu's translation API over HTTP, and hands the result back as a STRING you can feed straight into a CLIP Text Encode node.
The name is the plan: it's Baidu's general translation endpoint (api.fanyi.baidu.com/api/trans/vip/translate) wrapped in a ComfyUI node. The node builds the standard request - your appid, the text, a random salt, and an MD5 signature of appid + text + salt + appkey - posts it, and returns the trans_result[0]['dst'] field. No local model, no GPU work. That makes it one of those "API-wrapper nodes" the ecosystem keeps quietly shipping: it only works when you have a key and a network connection.
The inputs you actually touch:
text- the prompt you want translated. Multiline, so drop a full paragraph in.translate_from/translate_to- both are simplezh/endropdowns. The natural use is zh→en to turn Chinese prompts into the English tags most models were trained on.APIID/APIKEY- your Baidu API credentials. This is the part the README is upfront about: 百度翻译需自己申请api进行翻译服务 (you have to apply for the API yourself).
The gotcha that will bite you: the source code ships with the author's own APIID and APIKEY filled in as default values. It works for a couple of test calls, and then it stops - because you're burning the author's free quota, not yours, and sharing a key is bad practice anyway. Go apply at Baidu's translation open platform (fanyi-api.baidu.com), grab the free-tier key, and paste it in. The process takes about ten minutes and the free tier is genuinely free for low volume.
Second gotcha: the node fails silently. If the request errors for any reason - bad key, no network, rate limit - the except block just returns the literal string "Error". No exception pops up in the UI, no log line you'll notice. So if your translation comes back reading Error, that's the node's way of saying "check your key," not a broken install.
Third: the shipped code hits the plain http:// endpoint rather than HTTPS. For a translation of a prompt this is low-stakes, but it's a network call carrying your key, so it's worth knowing it's not TLS-wrapped by default.
How to install it - same as the rest of this pack: ComfyUI Manager → Install Custom Nodes → search ComfyUI-AC_FUNV2.0, or
cd ComfyUI/custom_nodes
git clone https://github.com/A719689614/ComfyUI-AC_FUNV2.0
then restart ComfyUI. No model files. The only dependency the translate node actually needs is requests, which is almost certainly already in your environment. (The pack's requirements.txt also pins torch==2.11.0 - ignore that line if pip complains; torch is already bundled with ComfyUI and the pin is not doing you any favors.)
Once installed, the node shows up under the ♑AC_FUNV2.0 category. Translation is for the intermediate step: translate to English, feed the STRING output into a CLIP Text Encode, and the tags you write in Chinese never have to touch your sampler. It's not a translator you'd use to localize a whole novel - but for prompt pipelines, it's the missing glue for a lot of Chinese-community workflows.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| translate_from | COMBO | 2 options: zh, en | |
| translate_to | COMBO | 2 options: zh, en | |
| APIID | STRING | — | |
| APIKEY | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |