Grok 4.6
Give it an image and it becomes a captioning node
- images
- text
- raw_json
- credits_consumed
- usage_json
- credits_left
What it is
Grok 4.6, packaged as one node in KIE Next / LLM / xAI / Grok. Text in, text out - with one twist that changes what the node is for: it has an images socket. Connect an IMAGE and you're no longer looking at a chat model, you're looking at a VLM. The pack uploads your image, sends it alongside the prompt, and hands back a STRING.
That makes this the API-side answer to the captioning half of our KB's LLM-in-the-graph write-up: describe a shot so you can feed the description to img2img or image-to-video, build alt text, or build a prompt from a reference picture you didn't generate. If you're captioning a LoRA dataset, be honest with yourself about the tradeoff - a hosted model is convenient and filtered, and a local captioner like JoyCaption is what the dataset crowd actually uses for coverage on the material that gets auto-moderated off a commercial endpoint.
How it works
On run, the node uploads the connected image batch as PNG(s) to KIE's upload endpoint, takes the returned URLs, and builds a Responses-style request: prompt as text content, images as image content, system_prompt as instructions, history_json as earlier input items. Then it polls the task and extracts text from the response JSON.
Nothing runs locally beyond the upload and a JSON parse. That's the whole node: the visible widgets are just a friendly face on an HTTP call, and the schema was generated from KIE's published request documentation for this model version.
The knobs
- prompt (required) - what you want done with the image. "Describe this image in one paragraph of photographic language, no preamble" works a lot better than "what is this".
- images - the
IMAGEsocket. Accepts a batch; feed a whole folder through it and you're captioning at API speed. - system_prompt - the standing instruction. For captioning, this is where you say what kind of caption you want: tags, natural language, one sentence, whatever your target model was trained on.
- reasoning_effort -
low/medium/high/xhigh, defaulthigh. For "look at this and describe it",lowis fine and cheaper; raise it when you're asking it to compare frames or spot inconsistencies between two shots. - max_output_tokens - 4096 default. Long captions plus thinking both count.
- web_search - off by default. Irrelevant for captioning; relevant when you're asking about something current.
- history_json and expert_override_json - plumbing.
[]and{}unless you know why you're changing them.
Outputs
text is what you forward - into CLIPTextEncode, a "save text" node, or another LLM node for a second pass. raw_json is the full response for debugging, usage_json is token accounting, and credits_consumed / credits_left tell you what the run cost and what's left, both of which are also printed on the node after a success.
One workflow shape worth stealing from the KB: caption first, then reshape. A VLM describes the image, a second LLM node (a different Grok version in this pack is fine) rewrites the description into the prompt format your generator wants. Two narrow jobs drift less than one open-ended "enhance my prompt" request, and it keeps your captioning and your prompting independent.
Install
Manager → KIE.ai Nodes Next, or git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next into ComfyUI/custom_nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
python -m pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
requests, Pillow, numpy, PyYAML - that's the list, and there are no weights to download. Restart ComfyUI, then save your KIE.ai key once under Settings → KIE.ai Nodes Next → Connection (or set KIE_API_KEY on a headless box).
Note that the pack generates its node library from KIE's live docs index on first launch and re-checks it about once a day, occasionally reloading the frontend. If a node is missing, run the catalog refresh rather than reinstalling.
Gotchas
- Captioners bleed subjects. This is the failure every vision model shares, hosted or local: with two people in frame it'll happily swap who wears what. Audit the first batch by hand before trusting a set of 200.
- Your images leave the machine. They're uploaded, and moderation follows the provider's policy, not yours. For sensitive material, caption locally.
- High effort on a description task is the most common way to turn a cheap run into a slow, expensive one. Set
low. - Empty
textalmost always means the answer wasn't where the scraper looked - checkraw_jsonbefore assuming the model refused. - No key yet? The error is
No KIE API key configured.... That's the Settings step, nothing more.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | User prompt / message. | |
| system_promptopt | STRING | — | |
| streamopt | BOOLEAN | false | — |
| tools_jsonopt | STRING | [] | Optional function/tool definitions supported by this model endpoint. |
| history_jsonopt | STRING | [] | Optional prior message/input array as JSON. |
| imagesopt | IMAGE | — | |
| reasoning_effortopt | COMBO | high | 4 options: low, medium, high, xhigh |
| web_searchopt | BOOLEAN | false | Use KIE's web-search tool where this endpoint supports it. |
| max_output_tokensopt | INT | 40961–131072 | — |
| expert_override_jsonopt | STRING | {} | Expert-only request overrides. Normal use does not require this. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| usage_json | STRING | — |
| credits_left | FLOAT | — |