DeepSeek Translator
Translation that cares about the country, not just the language
- STRING
Most "translate this" nodes are a single API call with a system prompt bolted on. DeepSeek Translator is trying to be something smarter: it translates, then polishes the translation against the target country's cultural context, then re-translates the improved version. The README credits this design to Andrew Ng's "Agentic workflow" - translate → get feedback → revise - and it genuinely shows in the output quality, especially for marketing copy or prose where "correct" isn't the same as "natural."
Here's the actual flow, from the source: the node sends your text to DeepSeek's deepseek-chat at a low temperature (0.3) with a strict "only return the translation" system prompt. If you left country empty, it stops there. If you gave it a country (say "France" or "Japan"), it runs a second pass where DeepSeek reviews the translation through a cultural-localization lens, then a third call that folds those suggestions back in. It even runs langdetect on the result to verify the output is actually in the target language, and re-translates if the model drifted. That verification loop is the clever bit, and it's rare to see in a custom node.
The inputs you'll actually touch:
text- multiline, the thing to translate.source_lang- defaultauto, which is fine for most cases.target_lang-zhoren, the only two choices. That's the honest scope of this node: it's a Chinese↔English tool.country- the magic input. Empty = plain translation. "USA", "UK", "France" etc. = localized polish. This is where the README's example screenshots show the payoff.clean_after_execution- defaultTrue; it re-reads the API key from disk after each run as a "cleanup." A bit odd, but harmless.
Output is a single STRING with the final translation.
Installing and keys
Pack install, cloud API, no model files:
cd ComfyUI/custom_nodes
git clone https://github.com/yiwangsimple/ComfyUI_GroqChat
restart, copy api_key.ini.example → api_key.ini, and set DEEPSEEK_API_KEY. One quirk from the source worth flagging: this node reads its key from the [DEFAULT] section of the ini, not [API_KEYS] like the other DeepSeek node in the pack. The example file puts DEEPSEEK_API_KEY under [DEFAULT], so it works out of the box - just don't "clean up" your ini and move it.
Gotchas
clean_after_execution re-loading the key every run is harmless but does mean a misconfigured ini fails at the first run, not the tenth. The real limitation is scope: two target languages, and if you leave country blank you're just paying DeepSeek for a plain translation a free tool could do. The node earns its keep specifically when you do fill in a country - that's the whole differentiator. If you're doing mechanical doc translation between zh and en, it's a solid pick; if you need a dozen languages, look elsewhere.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| source_lang | STRING | auto | — |
| target_lang | COMBO | en | 2 options: zh, en |
| country | STRING | — | |
| clean_after_execution | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |