Nodes/comfyUI-tool-2lab/Youdao translator 有道翻译
ComfyUI Node

Youdao translator 有道翻译

Translate your prompt before it hits the sampler

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
Youdao translator 有道翻译
  • app_key
  • app_secret
  • text
text
to_langen

Most image models are trained on English prompts, so if you think in Chinese, you have a translation problem standing between you and a good result. youdao_translator (2lab) is the in-graph fix: it calls NetEase Youdao's translation API and converts your text to the language your model understands - then hands the translated string straight to the CLIP encoder. It's the "translate before encode" node, and for a Chinese-speaking user base (which this pack clearly serves) it's one of the pack's most practical nodes.

The mechanism is real, and it's the thing that makes this node "an LLM-adjacent utility" rather than magic: Youdao's text translation API takes your source text, an app key, and a secret, and returns the translation. The node handles the call, signing it with your credentials, and outputs the translated string. No local model, no GPU cost - just a network request. The phrase "prompt engineering" often gets discussed as if it's about English token math; for non-English speakers, a reliable translation step is the more honest bottleneck, and this node sits exactly there.

Inputs

  • app_key and app_secret - your Youdao Zhiyun (有道智云) API credentials, pasted as key fields. You get these by registering an application on the Youdao open platform; there's a free quota, which is enough for hobby use.
  • text - the text to translate, multiline.
  • to_lang - target language: en (English, default) or zh-CHS (simplified Chinese). It only does these two, which is fine given the use case - you're either anglicizing prompts for a model or translating results back.

Output

  • text - the translated string, ready to wire into a CLIP text encoder or anywhere else that wants text.

Installing it

Part of comfyUI-tool-2lab, so the install is standard:

cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab

Or install "comfyUI-tool-2lab" via ComfyUI Manager, then restart ComfyUI. The one non-obvious dependency is the API key - you can't use this node until you have Youdao credentials.

Gotchas

  • It needs keys, and there's no free lunch forever. Youdoo's free tier runs out. If translations suddenly start failing, check your quota before you check your wiring.
  • Only en and zh-CHS. If you want English-to-Japanese or French-to-English, this node won't help; it's purpose-built for the Chinese-English bridge.
  • Network and secrets. The node calls an external API, so it needs outbound network access and it sends your credentials with each request. Treat the key like a password - and note the ecosystem's standing advice: be careful which custom nodes you give keys to, since nodes run arbitrary code.
  • Repo visibility. The pack's GitHub page currently returns 404, likely made private or renamed. Fresh installs can fail while existing ones keep working - not your error.
Category🦊2lab/llm

Inputs (4)

NameTypeDefaultDescription
app_keyKEY
app_secretKEY
textSTRING
to_langCOMBOen2 options: en, zh-CHS

Outputs (1)

NameTypeDescription
textSTRING