Disclaimer
Since I use dozens of structured prompt presets—complete with dialogue—I grew tired of having to manually change the tags whenever I wanted to switch to a different language. So, I guided ChatGPT to help me build a custom, tailored solution.
It’s working very well for me, so I’m sharing it in the hope that it might be useful to others. I haven’t set up a GitHub repository yet, but I plan to create one for future versions.
H3 Dialogue Translator — v1.0 for ComfyUI
Translate the dialogue in your MiniMax H3 prompts using Google or Bing while keeping the rest of the prompt unchanged. No API key, account, or local translation model is required. An Internet connection is necessary.

How it works
Connect your complete prompt to the STRING input, select a target language and a translation provider, then use the resulting STRING output in your H3 workflow.
The node identifies dialogue blocks using this format:
<d>[French] Bonjour, comment vas-tu ? </d>
With English selected, the block can become:
<d>[English] Hello, how are you? </d>
The spoken text is translated and its language label is updated. Scene descriptions, camera instructions, actions, and all other text outside dialogue blocks remain unchanged.
One target language per prompt
Version 1.0 uses one shared target language for every dialogue block in the input prompt.
The source prompt may contain multiple languages—for example, French, English, and Spanish—but all dialogue blocks are processed toward the same selected target language. Blocks already in that language are left unchanged.
Individual target languages cannot currently be assigned to separate lines or speakers. A future version may introduce independent language selection for each dialogue block, but this feature is not included in v1.0.
Supported languages
French, English, Spanish, German, Russian, Italian, Portuguese, Japanese, Chinese, Korean, and Arabic.
Technical behavior
The node reads the source language from each dialogue block’s [Language] label. It does not automatically detect the language of the spoken text, so the label should match the dialogue.
Each block is processed independently. Only dialogue fragments requiring translation are sent to the selected provider through the Python translators library. No model weights are loaded into RAM or VRAM.
Dialogue order, text outside the blocks, and whitespace surrounding each translated fragment are preserved. H3 control markers such as <cutoff> and <scenetrans> are retained and excluded from translation. Text fragments separated by these markers are translated separately, which may reduce linguistic context.
A prompt without dialogue blocks passes through completely unchanged, without making a network request. Empty dialogue blocks only have their language label updated.
Malformed or unclosed dialogue blocks, nested blocks, missing language labels, and unsupported source labels produce an explicit error. If a translation request fails, the node does not silently return a partially translated prompt.
Caching
An in-memory cache stores up to 512 successful translation fragments. Cache entries include the provider, source language, target language, and original text, keeping Google and Bing results separate.
The cache is cleared when ComfyUI restarts. ComfyUI’s standard execution caching also applies.
Installation
Extract the ComfyUI-H3-Dialogue-Translator folder into ComfyUI/custom_nodes, then install the dependencies using ComfyUI’s Python environment:
python -m pip install -r requirements.txt
Restart ComfyUI and find “H3 Dialogue Translator (Bing / Google)” under H3 / Text.
Limitations
Both providers are accessed through web connectors. Availability may change if a provider modifies its service or limits requests. Translation quality depends on the selected provider and available context.
Each text fragment is limited to 4,999 characters, without silent truncation. Internal line breaks within translated dialogue may be reformatted by the translation service.
Description
V1.0 - First release - WIP
