Bangtrix Translate Universal π
Translate, Polish, and CLIP-Encode β One Node Replaces Your Whole Prompt Chain
- clip
- positive_conditioning
- negative_conditioning
- positive_prompt_final
- negative_prompt_final
If you write prompts in anything other than English, this is the node that collapses the three-step ritual - translate your prompt, enhance it, CLIP-encode it - into a single box. It's the big sibling in Anonymzx/BangtrixToolkit's translate pair: where Bangtrix Simple Translate just hands you a translated string, Bangtrix Translate Universal goes all the way to CONDITIONING. You feed it your CLIP model and a prompt in, say, Indonesian, and it spits out positive and negative conditioning you can wire straight into a KSampler. No intermediate text nodes, no separate CLIP Text Encode.
How it works
The pipeline is simple and fully local except for one web call. It translates your positive and negative prompts to English using the same free Google Translate endpoint as the Simple node (translate.googleapis.com/translate_a/single?client=gtx - no key, needs internet). Results are cached in an in-memory LRU capped at 1024 entries keyed on language+text, so re-running the same prompt doesn't re-hit the network.
Then the polish happens with plain string concatenation:
- enable_clean (default on) replaces newlines with commas so multi-line prompts become one tidy tag line.
- enable_enhance (default on) appends a style tag and a quality tag from hardcoded presets - e.g.
highquality adds "high quality, detailed, sharp focus",ultraadds "β¦8k, sharp focus", and styles range fromanime("clean lineart, vibrant colors") toproduct("studio lighting, clean background"). - enable_auto_negative (default on) appends a boilerplate negative at
normal/strong/ultrastrength, plus a style-specific extra (portrait gets "bad eyes, asymmetrical faceβ¦", anime gets "bad proportions, extra limbs"). - Then it calls ComfyUI's own
CLIPTextEncodeinternally and returns the result.
The inputs and outputs that matter
clip is the only non-negotiable one - it's the CLIP from your checkpoint loader, and without it nothing encodes. The prompts you'll actually tune: positive_prompt, negative_prompt, source_language (auto is usually right), target_language (en), quality_preset, and style_preset. The rest are on/off switches you'll mostly leave as defaulted - except the ones below.
Two outputs are the point: positive_conditioning and negative_conditioning (both CONDITIONING) go straight into KSampler's positive/negative inputs. The other two, positive_prompt_final and negative_prompt_final, are strings showing exactly what got encoded - wire them into a Show Text node while you're dialing things in, because seeing the final English prompt is genuinely useful for debugging.
Two honest takes
The enhancement presets are boilerplate - literally a few hardcoded tag strings. The prompt-engineering evidence is not kind to "8k, sharp focus" style tags; they're cheap to add, but they mostly don't move results on a fixed seed. The translation is the real value here. Use the presets as a starting point, don't expect ultra to rescue a weak prompt.
Second: the auto-negative defaults to strong, and that's fine on SDXL (the negative pass runs anyway once CFG is above 1, so it's free). But on guidance-distilled models - Flux, Turbo, Lightning - CFG is 1 and the negative prompt does literally nothing. So on those models, don't sweat enable_auto_negative; if you'd rather not ship the boilerplate, just flip it off.
Installing and gotchas
Same install as the whole pack: ComfyUI Manager β search BangtrixToolkit β install β restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/Anonymzx/BangtrixToolkit
pip install -r BangtrixToolkit/requirements.txt
Note the pack ships a hardware-monitor overlay that auto-launches, plus deps (aiohttp, psutil, pywin32, pynvml) that exist for that monitor - this node only really needs requests and internet.
Troubleshooting
- Prompt comes out untranslated - silent fallback; the node returns your original text if the Google endpoint fails. The
*_prompt_finaloutputs are how you spot this. - Weird
[ORIGINAL]: ... [TRANSLATED]: ...text in your render - you left show_original on. That flag writes that literal text into the encoded prompt; it's for debugging the translation, not for final renders. - Cache isn't persisting - right, it's per-session. Harmless, just re-translates after a restart.
- Empty prompts get safety fallbacks ("masterpiece" / "low quality"), so the node never errors on blanks.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | β | |
| positive_prompt | STRING | β | |
| negative_prompt | STRING | β | |
| source_language | COMBO | auto | 105 options: auto, af, sq, am, ar, hy, +99 |
| target_language | COMBO | en | 105 options: auto, af, sq, am, ar, hy, +99 |
| quality_preset | COMBO | high | 3 options: normal, high, ultra |
| style_preset | COMBO | none | 8 options: none, anime, realistic, cinematic, photography, product, +2 |
| enable_translate | BOOLEAN | true | β |
| enable_enhance | BOOLEAN | true | β |
| enable_clean | BOOLEAN | true | β |
| enable_cache | BOOLEAN | true | β |
| enable_auto_negative | BOOLEAN | true | β |
| auto_negative_strength | COMBO | strong | 3 options: normal, strong, ultra |
| show_original | BOOLEAN | false | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive_conditioning | CONDITIONING | β |
| negative_conditioning | CONDITIONING | β |
| positive_prompt_final | STRING | β |
| negative_prompt_final | STRING | β |