Pixtral Translate EN
A paid English translator, from the pack that gives you a free one
- translated_en
Here's the thing you need to know before anything else: this node charges you to translate text into English, and the same pack contains three Google Translate nodes that do the same job for free. So the honest first question is why would you ever use this one?
The answer is quality. The Google nodes use googletrans, which scrapes Google's free endpoint - fast, free, and mechanical. Pixtral Translate runs your text through Mistral's pixtral-large-latest LLM with a system prompt that says, in effect, "translate this properly and return only the translation, no commentary." For a prompt written in broken or heavily stylized language - half a sentence of tags, slang, mixed Russian and English - the LLM path often understands the intent and rephrases it idiomatically where a dictionary translator just does a word swap. If you're writing prompts for a model with an LLM encoder (the T5-class ones on Flux), that fluency can translate into better adherence.
How it works
It's a text-only call to the Mistral API. No image input - pure LLM mode. It builds a two-message conversation (system instruction + your text), sends it with temperature (default 0.3) and max_tokens 2048, and returns translated_en as a STRING. Like its sibling ComfyUIPixtralLargeG, it runs async on httpx, so it doesn't freeze your graph while the network round-trip happens.
Inputs: text (multiline) and temperature (0.0–1.5, default 0.3). One output: translated_en. The default temperature of 0.3 is the right instinct - you want a literal, faithful translation, not a creative one. Bump it only if the output comes back stiff.
The cost question, straight
Every run is a paid API call, and you need MISTRAL_API_KEY set in your environment (the node reads it via os.getenv - there's no key field in the UI). The README's framing - "use it after your Russian-language nodes or before an SDXL prompt" - is really aimed at people who already pay for Mistral. If you don't have a Mistral key, the free Google Translate nodes in this same pack are the sensible default. If you do, this is the one to reach for when a prompt refuses to translate cleanly, and you can wire translated_en straight into your CLIP text encoder.
Install
ComfyUI Manager: search ComfyUI_Gayrat and install, then restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/gayratv/ComfyUI_Gayrat
cd ComfyUI_Gayrat
pip install -r requirements.txt
Set MISTRAL_API_KEY in the environment your ComfyUI process launches with. It shows up under Gayrat/Pixtral Large. One quirk worth knowing: like the other Pixtral node, it swallows exceptions and returns the error string as translated_en - so if the output suddenly is a Python traceback, that's the node telling you the API call failed, not you breaking the graph.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| temperature | FLOAT | 0.30–1.5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| translated_en | STRING | — |