Mistral LLM
A Vision-Capable Local LLM Node That Answers About Your Images, No API Key
- mistral3_model
- image
- output
"Mistral LLM" is the node that actually does the thinking in the otjamin/ComfyUI-Mistral-LLM pack. Feed it a loaded model, a prompt, and optionally an image, and it returns text - a reply, an expanded prompt, a caption, whatever you asked for. Everything runs locally on your own GPU. No API key, no account, no per-token billing, and because the model lives on your disk, nothing you prompt it with ever leaves your machine.
Why would you put an LLM in a node graph at all? Because the community has spent the last year wiring local models in to act as prompt engineers, taggers, and captioners - turn a rough idea into a detailed cinematic prompt, describe what's in a generated image, translate a style reference into words. The local part matters: a 700-upvote thread on an LLM prompt node literally leads with "free, local, offline" as its selling points. This node is the heavyweight end of that trend.
How it works
The node takes the M3MODEL dict from Load Mistral 3 Model, then builds a ChatCompletionRequest the way you'd talk to a hosted Mistral API - except nothing is hosted. Your system_prompt (if set) becomes a system message, your user_prompt becomes the user message, and if you've attached an image, that image is packed in as an ImageChunk right alongside the text. The tekken tokenizer encodes it all, model.generate() runs with a hardcoded max_new_tokens=1000, and the node decodes only the newly generated tokens and hands you a plain string.
The interesting part is the vision path: Mistral Small 3.2 is a multimodal model, so you can ask it questions about an image - "describe this composition," "turn this into a prompt." ComfyUI's IMAGE tensor is converted to PIL and fed as bf16 pixel values. Note the single-image caveat: tensor_to_pil takes the first frame of your tensor, so feed it one image at a time, not a batch.
The inputs and outputs that matter
Required:
mistral3_model(M3MODEL) - from the Load Mistral 3 Model node.user_prompt- a multiline string, the actual question or instruction. This is the input you'll live in.
Optional:
system_prompt- a multiline string, the persona or constraints ("You are a terse prompt writer. Output only the prompt."). Use it; it's the difference between a wall of chat and usable output.image(IMAGE) - attaches a picture to your prompt. This is what turns the node from a text LLM into a vision one.
The single output:
output(STRING) - the model's reply. Wire it into any text preview node to see it, or feed it into a prompt text field downstream and use the LLM's answer to drive generation.
The sharp edges
First, the memory reality: this node does model.to(device) - the entire ~48GB (bf16) model gets moved onto your GPU in one shot before generating. The loader was polite and parked weights in CPU RAM; this node is not polite. On a card that can't hold it, you get a CUDA OOM, and there's no quantization setting to bail you out. This pack wants a serious GPU or a lot of patience.
Second, you get no dials. max_new_tokens is fixed at 1000, there's no temperature, no sampler, no token budget input - the code is a "type and go" node, not a tuning instrument. If you need fine control over generation, this isn't the pack.
Third, the first run will look like a hang while the loader downloads ~50GB of weights into ComfyUI/models/LLM/. That's normal. Both nodes install together from one pack, so a single install covers this one:
cd ComfyUI/custom_nodes
git clone https://github.com/otjamin/ComfyUI-Mistral-LLM
...or search "comfyui-mistral-llm" in ComfyUI Manager, then restart. The repo is young (one commit, empty README, Python 3.12), so read the source if something surprises you. And given what LLM nodes did to the ecosystem's reputation back in the 2024 LLMVISION incident, a quick skim of any node pack's code before you run it is a cheap habit.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| mistral3_model | M3MODEL | — | |
| user_prompt | STRING | — | |
| imageopt | IMAGE | — | |
| system_promptopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | STRING | — |