ZwPromptText
Same auto-translation as ZwPrompt, minus the CLIP — just the string out
- STRING
ZwPromptText is the little brother of ZwPrompt in the ComfyUI-zw-tools pack: same Chinese-to-English auto-translation, same backend setup, but no CLIP input and only a STRING output. Where ZwPrompt is a drop-in CLIPTextEncode, this node is the translation layer you can bolt onto almost anything else.
You'd reach for it when you don't want conditioning out - you want text. Common setups: feed your Chinese prompt in and pipe the translated English string into a different text-encode node, a prompt scheduler, a save-to-file node, or any custom node that takes a prompt as a string. Or just use it as a free translator: type your Chinese tags in, queue once, and read the English result off the output before you reuse it in a plain workflow. It exists because the pack's author had workflows where the translation mattered and the CLIP part didn't.
How it works
It's the same code path as ZwPrompt, minus the tokenization. In the source, encode() checks the enabled_trans toggle, runs translate() if it's on, and returns the resulting string.
translate() looks up which backend you configured in the pack's settings (stored in its local SQLite DB): 0 = off, 1 = Baidu Translate, 2 = the author's AI8808 API, which is a DeepSeek-based paid service. Both backends start with a has_chinese() check, so English input passes through untouched - there's no point paying for a translation of text that's already English. The Baidu path uses your free-tier appid + secret key; AI8808 uses an API key and also powers the pack's AI prompt-expansion feature.
That's the entire mechanism. This is a thin node, and it knows it.
The inputs that matter
- text - your multiline prompt. Default is "双击 呼出 词库面板" ("double-click to open the word bank panel"), a hint that double-clicking the textarea opens the pack's tag-manager UI. It's a placeholder, not a requirement.
- enabled_trans - the on/off translation toggle (the switch the author added in the 2025-12-01 update, so you can flip between Chinese input and English output without editing the node).
Output: one STRING - the prompt, translated if it contained Chinese. Wire it into whatever wants a prompt string.
Installing it
Identical to the rest of the pack:
# via ComfyUI Manager: search "ComfyUI-zw-tools"
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/zzw5516/ComfyUI-zw-tools
Then restart ComfyUI. Two gotchas, both from the README and worth repeating here because they're not obvious:
pip install ffmpeg-pythonis required even though this node never touches video. The pack imports its file/video manager at load time, so without that package the whole pack fails to import and ZwPromptText simply won't appear in your node list.- You must configure a translation backend after install - Baidu Translate credentials or an AI8808 API key. With no backend set, the node passes your text through untranslated, which is easy to mistake for a bug.
Where people get burned
The most common failure is the missing-key silent passthrough: the toggle is on, your Chinese comes out as Chinese, and you assume the node is broken. It's just unconfigured - set the backend in the pack's panel and retry. If you're on the Baidu path and it fails with a proxy-flavored error string in the console, that's the known proxy incompatibility; turn off your network proxy for the call. And if you feed it pure English and see no change, that's the has_chinese() passthrough working as designed.
One thing worth knowing before you lean on it: the translation is plain machine translation of tags, not an LLM rewrite. Fine for CLIP-lineage SDXL/Illustrious-style prompting; don't expect it to restructure your prompt into good prose.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled_trans | BOOLEAN | true | — |
| text | STRING | 双击 呼出 词库面板 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |