DataSet_GroqChatImage
Vision Captioning at Groq Speed, for Practically Nothing
- image
- STRING
The vision version of DataSet_GroqChat: give it an IMAGE tensor and a prompt, and it returns a caption string generated by a multimodal model running on Groq's hardware. If you want to auto-caption a training dataset without paying OpenAI's per-image rates, this is the budget play - and Groq's free tier makes it the cheapest way to test whether LLM captioning is even worth it for your project.
The trade-off is real, so let's be honest about it: Groq's vision models are good, not Claude-4o-grade. For natural-language captions feeding a Flux or Z-Image LoRA, they'll beat a generic tag dump, but if you're captioning the definitive dataset for a paid product, you'll likely want the pricier providers or hand-captioning. For iterating on a dataset idea cheaply? This is the one.
Inputs and output
- image - an IMAGE tensor, straight from
DataSet_LoadImageor any LoadImage node. - model - a dropdown populated live from the Groq API, same as the text node.
- user_prompt - the caption instruction, e.g. "Describe this image as a detailed caption."
- max_tokens - response cap, default 1024.
Output is a single STRING caption.
How it works
The node converts the image tensor to a base64 PNG in memory and posts it to Groq's OpenAI-compatible chat endpoint as an image_url payload, alongside your text prompt. Temperature is fixed at 0.5. Every run is a live API call, so the pipeline is: load image → caption → collect string → write caption file. DataSet_LoadImage is the natural front end because it hands you the image and the filename as separate outputs, which you need for pairing caption files back to images.
The Key Error dropdown (yes, really)
Same startup trap as its text sibling, one letter worse: if GROQ_API_KEY isn't in your environment when ComfyUI boots, the model dropdown contains a single option literally named Key Error. It's not an error dialog - it's the placeholder model ID the node falls back to when it can't fetch your model list. Set the key and restart:
export GROQ_API_KEY=gsk_...
Then the real model IDs appear. Miss this and you'll sit there wondering why the node's dropdown has one option and it's called an error.
Install
Pack standard:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-DataSet.git
cd ComfyUI-DataSet && pip install -r requirements.txt
Restart, set the key, done. No local model download - that's the whole appeal. Errors surface as STRINGs beginning with Error: rather than failing the queue, so if a run returns garbage, check the key and the network before you assume the prompt is wrong. Run it on one image first, read the caption, and decide if Groq's quality bar is high enough for your dataset before you fire it at the whole folder.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model | COMBO | Key Error | 1 options: Key Error |
| user_prompt | STRING | — | |
| max_tokens | INT | 1024 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |