Prompt Translator & Manager
A prompt box that explains your tags back to you — and can pause the queue while you fix them
- 英文提示词
What it is, and why you'd want one
If you prompt Illustrious, NoobAI, WAI or Pony, you're writing a language you're half-fluent in. dutch angle, from below, mismatched pupils - the model knows exactly what those mean. You're guessing. Danbooru tags are the prompting interface for the whole SDXL anime lineage, and they still work on Anima, whose Qwen encoder reads tags and prose together. Tag literacy is the real bottleneck.
BilingualPromptInspector - "Prompt Translator & Manager" in the menu, category text/prompt - is CLIPTextEncode with a dictionary bolted to the text box. You type a prompt; the frontend draws it as clickable tags with explanations, weights and a drag order, plus a sidebar for your dictionary and saved prompts. The output is a plain string, so nothing downstream knows it's there.
Clear this up early, since the repo name scares people off: it isn't Chinese-only. The JS is English-first, the only shipped translation is Chinese, and the UI follows your ComfyUI locale. It's a second-generation fork of Qiongyi44's original, now maintained independently by mengshengzhijie, at v1.2.1.
How it works
The text widget stays the single source of truth. The tag view is a renderer over that string, and every reorder, weight edit, delete or hide rewrites the text underneath while preserving your commas, spaces and line breaks - nothing is injected at sample time.
The dictionary is local JSON: built-in packs (base, anima, characters, poses, clothing, camera) plus your own entries. The big Danbooru Chinese-English database isn't bundled - the README calls that a licensing boundary - so you build it from a third-party tag.sqlite with the pack's tools/build_large_dictionary.py; renaming that file isn't enough.
Translation has three settings: dictionary-only (offline, free), Baidu Translate (your own key), or an AI backend over an OpenAI-compatible endpoint or Ollama. "Translate & optimize" and "optimize to Anima" always route through the AI service, since neither is a lookup. Anima mode resegments your existing tags into the model card's official order - [quality/meta/year/safety] [character count] [character] [series] [artist] [general tags] - without inventing tags you didn't write.
The inputs and outputs that matter
text(required, multiline) - the prompt box, flaggeddynamicPromptslikeCLIPTextEncode's field, so{this|that}wildcard tooling still recognises it.prompt(optional, string, force input) - the dot on the node's left. Feed it any text output and the node can intercept it.english_prompt(string output) - into yourCLIPTextEncode, positive or negative, exactly where the old text widget fed in.
That prompt input is where this stops being a fancy text box. With takeover on (default once something is connected), hitting Run pulls the upstream text in and pauses the workflow until you click Continue. The node function is async def, so ComfyUI's executor parks it as pending and blocks downstream - not a polling loop, and not holding VRAM while it waits. Turn takeover off and it's a wire.
Install
ComfyUI Manager, search "Prompt Translator & Manager". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/mengshengzhijie/ComfyUI-Bilingual-Prompt-Inspector
Restart, then hard-refresh (Ctrl+F5) - the frontend cache will happily serve stale JS. Needs ComfyUI ≥ 0.3.40 and Python ≥ 3.10. There are no pip dependencies: pyproject.toml declares an empty list, and the aiohttp its server code imports already ships with ComfyUI. No model downloads either, unless you want the big dictionary.
Where people get burned
Nodes 2.0. ComfyUI's Vue frontend rewrite broke drag-and-drop in plenty of custom UIs; v1.2.1 is the release that fixed tag dragging here. If dragging does nothing, you're on an older build - or switch Nodes 2.0 off, still the ecosystem-wide workaround.
Settings that live on the node, not in the API export. The hide list, takeover toggle and import policy are stored in node.properties, so exporting as API format leaves them behind: headless runs pass straight through and hidden tags reappear.
Pausing blocks the queue. While the node waits for your Continue click it holds ComfyUI's execution thread, so everything queued behind it waits too. Submit by API with no browser and nobody can confirm - it auto-releases after ~20 seconds and passes the upstream text through.
The AI path leaves your machine. Hosted endpoints filter, and cloud models refuse NSFW outright - which is why Ollama is an option. Keys sit in a config file bound to the install, never in the workflow or returned to the browser; but a config file isn't a keychain.
Smaller ones: auto mode is a heuristic and can misread unusual text, so switch modes by hand; and loading a favourite overwrites the node text with no Ctrl+Z.
The bit you'll actually keep using
The test for whether a tag earns its place: fix the seed, generate with and without it, change nothing else. Here it's two clicks - hide a tag with the eye icon, run, restore it afterwards.
One expectation to set: the pack has essentially no footprint in the English-language Reddit corpus, so there's no crowd-sourced troubleshooting behind it - the README, in-repo docs/ and GitHub Issues are it. Its known-issues doc is also candid that a dictionary hit proves a tag exists, not that your checkpoint learned it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| promptopt | STRING | — | |
| effective_textopt | STRING | — | |
| use_effectiveopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 英文提示词 | STRING | — |