Groq Vision
Caption your renders without renting a GPU
- image
- text
- usage_info
You just rendered an image and you want the machine to tell you what it sees - so you can caption a training set, reverse-engineer a prompt, or auto-tag a batch for a LoRA. Local vision models work, but they eat VRAM and setup time. Groq Vision skips all of that: it takes a ComfyUI IMAGE tensor straight from your graph, sends it to Groq's hosted Llama 4 models, and hands back a text description. No local model, no download, no VRAM spent.
That last part is the real appeal. The diffusion GPU stays free for diffusion, and the "what is this?" question gets answered by a cloud model that runs faster than most things you could run locally anyway. Groq's whole reputation is speed plus a free API tier, and this pack is built entirely around that.
How it works
The interesting bit is what happens to your image before it's sent. The node takes the tensor (shape B, H, W, C), converts it to a PIL image, JPEG-encodes it to base64, and pastes it into the request as a data:image/jpeg URL alongside your prompt. Because it handles the whole batch tensor, a multi-image input becomes multiple images in a single request - ask one question about five frames at once. Then it's a plain chat completion against the vision model, with the same retry-and-parse plumbing as the rest of the pack.
The inputs that matter
- image - the required
IMAGEinput. Wire it to anything that outputs an image: aLoad Image, aVAE Decode, or a sampler. A batch of images is fine; they all get packed into one request. - prompt - what you want to know. "What is in this image?" is the default, but "describe the lighting and composition" or "write a tag list" works better for real use.
- model -
meta-llama/llama-4-scout-17b-16e-instructby default, withmeta-llama/llama-4-maverick-17b-128e-instructas the beefier option. Maverick is the smarter one; Scout is the cheap-and-fast one. - jpeg_quality (50–100) - the sleeper knob. The image is compressed to JPEG before upload, so dropping this toward 50 shrinks the payload noticeably. For captions, 80 is usually plenty and snappier than 95.
- temperature and max_tokens - the usual dials. For captioning, low temperature keeps the output consistent.
Optional api_key, system_prompt, and that's the set. The two outputs are text (the answer) and usage_info (token accounting). Wire text into a save/display node, or straight into a prompt-engineering loop.
Installing it
Same as every node in this pack. ComfyUI Manager → search "Groq Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/brayevalerien/ComfyUI-GroqNodes
cd ComfyUI-GroqNodes
pip install -r requirements.txt
Restart ComfyUI, then set your GROQ_API_KEY (env var, .env, or paste it into the node). The dependencies are just groq, Pillow, numpy, aiohttp, and friends - nothing heavy, and no model downloads.
The thing nobody warns you about
Privacy. Your images are leaving your machine and hitting Groq's API - that's inherent to any cloud-vision node, and it's worth saying out loud before you feed it a dataset or something sensitive. Beyond that, expect the usual cloud-API friction: rate limits on the free tier, and the fact that errors show up as text in output ("Configuration error…" / "Error analyzing image…") rather than a clean exception. If you get a cryptic message, your key or your network connection is the first suspect. And since this is a young, one-maintainer pack, treat it like any custom node that runs code on your box - install from the real repo, keep it updated.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | What is in this image? | — |
| model | COMBO | meta-llama/llama-4-scout-17b-16e-instruct | 2 options: meta-llama/llama-4-scout-17b-16e-instruct, meta-llama/llama-4-maverick-17b-128e-instruct |
| temperature | FLOAT | 1.00–2 | — |
| max_tokens | INT | 10241–8192 | — |
| api_keyopt | STRING | — | |
| system_promptopt | STRING | — | |
| jpeg_qualityopt | INT | 9550–100 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| usage_info | STRING | — |