Nodes/comfyUI-tool-2lab/Baidu translator 百度翻译
ComfyUI Node

Baidu translator 百度翻译

Same name, no keys — this one rides on the 2lab cloud

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
Baidu translator 百度翻译
    • text
    text
    to_langen

    Here's the naming trap this pack keeps setting: two nodes display as "Baidu translator 百度翻译," and the only visible difference is that one of them has no credential fields. This one - BaiduTranslator (2lab) - is the no-keys version. Just text, a to_lang selector, and translated text out. No app_id, no api_key.

    That absence tells you everything. Like ChatGLM (2lab) and AzureOpenaiGPT (2lab), this node doesn't call Baidu with your credentials - it sends the text to the 2lab backend (api.factx.cn), and the backend, which holds its own Baidu account, does the translating. The cost is invisible to you locally, but the node only works if you're bound to the 2lab platform, which means the WeChat QR step (2lab_key.png) on first launch, a Chinese-market account, and no real way to debug what the server is doing.

    The inputs that matter:

    • text - what to translate, multiline.
    • to_lang - target language, default en, with zh as the alternative.
    • text out (STRING) - the translation.

    That's the whole surface. If you just want Chinese↔English text in your workflow and you own no Baidu account, this looks tempting - until you run it and hit the missing-user-key error because you never did the WeChat binding.

    My advice, plainly: use baidu_translator (2lab) instead - the sibling with app_id and api_key that calls Baidu directly. It works for any user with a Baidu developer app, it's debuggable, and it doesn't tie your workflow to the 2lab cloud. This server-backed variant only makes sense if you're deliberately building on the 2lab platform and want published apps to translate without exposing or requiring user credentials - a real scenario for that platform's audience, and almost certainly not yours if you're reading this in English.

    A quick disambiguation note for when you're hunting in the node menu or fixing a missing-node error in a downloaded workflow: baidu_translator (2lab) = your keys, direct call; BaiduTranslator (2lab) = no keys, 2lab cloud. Both come from the same pack, so installing comfyUI-tool-2lab fixes the missing-node error either way - just pick the right one once it's loaded.

    Installing it

    Part of 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. No model downloads; the translation happens on the 2lab server.

    Common issues

    The one failure that matters: "user key not set" (还没设置userKey) means you're not bound to the 2lab platform and this node has no path forward without it. Don't go hunting for a hidden key field - there isn't one. Either do the WeChat binding (a real commitment for a non-Chinese user) or switch to baidu_translator (2lab) with your own credentials. If you are bound and the translation fails, it's server-side, and given the pack's thin Chinese README and nonexistent English community, your debugging options end at "try again later."

    Category🦊2lab/api

    Inputs (2)

    NameTypeDefaultDescription
    textSTRING
    to_langCOMBOen2 options: en, zh

    Outputs (1)

    NameTypeDescription
    textSTRING