Baidu translator 百度翻译 (Factx API)
Baidu Translate inside the graph — English and Chinese, and that's it
- api_id
- api_key
- text
factx_api_baidu_translator (2lab) is a translation node that calls Baidu's translation service through the Factx API marketplace. Text in, translated text out - and the pack's own display name tells you the whole story up front: "Baidu translator 百度翻译". It's the pack's most useful small node if you work across English and Chinese, and the most obviously China-facing one besides.
The use case it exists for: machine-translating prompts. A huge amount of Chinese-language AI art workflow material is written in Chinese, and models' CLIP encoders still work best when prompts are in the language the checkpoint was trained on. So the loop goes: Chinese prompt in → translate to English → feed the English result to your CLIP Text Encode. Or the reverse, when you're generating content in Chinese. Rather than tabbing out to a web translator and pasting back, the node does it inside the graph - and because it's a node, you can chain it: translate, then reword, then assemble a prompt from the result.
How it works
Required inputs:
- api_id - your Factx account ID (masked
KEYfield). - api_key - your Factx API key (masked).
- text - the string to translate, multiline.
- to_lang - the target language, and here's the honest limitation: the enum has exactly two choices,
enandzh. The author built this as an English⇄Chinese translator and nothing else. French, Spanish, Japanese - not an option.
The text output is the translation, ready to feed a CLIP Text Encode, an LLM node, or the pack's OutputText.
Two things to set expectations. First, Baidu here means the Baidu Translate API - the translation arm of Baidu's cloud, the same company behind the ERNIE models - but you're not calling Baidu directly; the request goes through your Factx credentials, so the api_id/api_key pair is your Factx marketplace auth, not a Baidu key. Second, the pack is undocumented (the README is one word long) and there's essentially no English community discussion of the Factx API to consult, so if the call fails the troubleshooting surface is thin. The usual suspects apply: wrong credentials, no network, or a language pair outside the en/zh toggle.
For anyone inside the Factx ecosystem, this is the most pleasant node in the pack to use day-to-day - a translator with exactly one job and no model downloads. For everyone else, it's a niche utility that only makes sense if you're already holding Factx credentials.
Installing it
From AI2lab/comfyUI-tool-2lab. ComfyUI Manager → search comfyUI-tool-2lab → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab
Restart ComfyUI after. No models, no dependencies - just credentials and network access. And the standard key note for this family: masked inputs keep keys off the visible graph, but workflow JSON travels into output images, so never share a graph with a live key baked in.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| api_id | KEY | — | |
| api_key | KEY | — | |
| text | STRING | — | |
| to_lang | COMBO | en | 2 options: en, zh |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |