Nodes/BangtrixToolkit/Bangtrix Translate Universal 🌐
ComfyUI Node

Bangtrix Translate Universal 🌐

Translate, Polish, and CLIP-Encode β€” One Node Replaces Your Whole Prompt Chain

By AnonymzxΒ·Created 4 months agoΒ·Updated 2 months agoΒ· 2
Bangtrix Translate Universal 🌐
  • clip
  • positive_conditioning
  • negative_conditioning
  • positive_prompt_final
  • negative_prompt_final
β—„positive_promptβ–Ί
β—„negative_promptβ–Ί
β—„source_languageautoβ–Ί
β—„target_languageenβ–Ί
β—„quality_presethighβ–Ί
β—„style_presetnoneβ–Ί
β—„enable_translatetrueβ–Ί
β—„enable_enhancetrueβ–Ί
β—„enable_cleantrueβ–Ί
β—„enable_cachetrueβ–Ί
β—„enable_auto_negativetrueβ–Ί
β—„auto_negative_strengthstrongβ–Ί
β—„show_originalfalseβ–Ί

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. high quality adds "high quality, detailed, sharp focus", ultra adds "…8k, sharp focus", and styles range from anime ("clean lineart, vibrant colors") to product ("studio lighting, clean background").
  • enable_auto_negative (default on) appends a boilerplate negative at normal/strong/ultra strength, plus a style-specific extra (portrait gets "bad eyes, asymmetrical face…", anime gets "bad proportions, extra limbs").
  • Then it calls ComfyUI's own CLIPTextEncode internally 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_final outputs 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.
CategoryBangtrixToolkit

Inputs (14)

NameTypeDefaultDescription
clipCLIPβ€”
positive_promptSTRINGβ€”
negative_promptSTRINGβ€”
source_languageCOMBOauto105 options: auto, af, sq, am, ar, hy, +99
target_languageCOMBOen105 options: auto, af, sq, am, ar, hy, +99
quality_presetCOMBOhigh3 options: normal, high, ultra
style_presetCOMBOnone8 options: none, anime, realistic, cinematic, photography, product, +2
enable_translateBOOLEANtrueβ€”
enable_enhanceBOOLEANtrueβ€”
enable_cleanBOOLEANtrueβ€”
enable_cacheBOOLEANtrueβ€”
enable_auto_negativeBOOLEANtrueβ€”
auto_negative_strengthCOMBOstrong3 options: normal, strong, ultra
show_originalBOOLEANfalseβ€”

Outputs (4)

NameTypeDescription
positive_conditioningCONDITIONINGβ€”
negative_conditioningCONDITIONINGβ€”
positive_prompt_finalSTRINGβ€”
negative_prompt_finalSTRINGβ€”