Nodes/ComfyUI_Gayrat/Pixtral LargeG
ComfyUI Node

Pixtral LargeG

Caption an image, get an English translation as a bonus

By gayratv·Created about a year ago·Updated about a year ago· 3
Pixtral LargeG
  • image
  • response_original
  • response_en
promptDescribe the image
temperature0.7
top_p0.85

Let's get the uncomfortable part out front: this node does not run a model on your GPU. It calls Mistral's pixtral-large-latest over the API, which means it costs money per call and it needs an API key. It's the "the model isn't on your machine" pattern - handy, but a different beast from the local LLM nodes people usually reach for in ComfyUI.

What you get for that: a proper vision-language model sitting in your graph. Feed it an image and it describes it; don't feed it an image and it's just a chat LLM. And here's the nice touch - it returns the model's answer in its original language and an automatic English translation, because it quietly makes a second API call to translate the first response.

How it works

The node is an httpx + asyncio wrapper around Mistral's chat-completions endpoint. On each run it:

  1. Reads MISTRAL_API_KEY from your environment (no api_key field in the UI - you set the variable, or the node errors out).
  2. Sends your prompt plus, if connected, the image - downscaled to max 1024px and re-encoded as JPEG at 85% quality to keep the request small.
  3. Gets the model's answer, then sends a second request that says "translate this to English," returning both texts.

The async part matters: the node doesn't block the whole graph while it waits on the network. And since response_original and response_en are both STRING, you wire them into text boxes, prompt-builder nodes, or anything that eats text.

The inputs you actually set

  • prompt - defaults to "Describe the image". This is your instruction.
  • temperature (0.0–1.5, default 0.7) - creativity dial.
  • top_p (0.0–1.0, default 0.85) - the README's guidance is genuinely useful: 0.6–0.8 for factual output, 0.85 balanced, 0.95+ creative. If it hallucinates, drop it toward 0.75.
  • image (optional) - leave it unplugged for pure text chat.

Outputs: response_original and response_en, both STRING.

Honest takes

Two things to weigh before you build a workflow on this. First, cost - every run is two API calls, and video or batch work adds up fast. Second, the API path filters content, so it's useless for exactly the uncensored jobs people put local LLMs in the graph for. Where it genuinely shines is when you want frontier-chat-quality captioning or prompt rewriting and you don't care about local or NSFW.

One more thing, and it's the KB's warning as much as mine: an API node whose whole job is to phone home with a credential is the exact shape that got abused once before in this ecosystem. The repo is a small personal pack with essentially zero community footprint, so skim the code before you hand it your key.

Install

ComfyUI Manager: search ComfyUI_Gayrat. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/gayratv/ComfyUI_Gayrat
cd ComfyUI_Gayrat
pip install -r requirements.txt
export MISTRAL_API_KEY="your-key"

Restart ComfyUI, and set MISTRAL_API_KEY wherever your ComfyUI process picks up environment variables (a .env or your launch script - not in the workflow). Find the node under Gayrat/Pixtral Large. If the key is missing or the API is unreachable, the node returns the error text as its output instead of crashing - annoying but at least it tells you what went wrong.

CategoryGayrat/Pixtral Large

Inputs (4)

NameTypeDefaultDescription
promptSTRINGDescribe the image
temperatureFLOAT0.70–1.5
top_pFLOAT0.850–1
imageoptIMAGE

Outputs (2)

NameTypeDescription
response_originalSTRING
response_enSTRING