APNext Grok Vision Analyzer
Caption an image into a prompt using Grok vision
- images
- STRING
Point it at an image, get a text prompt describing it. GrokVisionNode (APNext Grok Vision Analyzer) is the xAI vision equivalent of this pack's GPT and Groq vision nodes - it sends your images to Grok's multimodal API and returns a description you can feed straight into a generation. Reach for it if you're already in the xAI ecosystem, or if you want a second opinion when GPT's caption isn't landing.
It's the vision side of the same idea running through the whole pack: modern image models read prose, so a good caption is a good prompt, and a multimodal LLM writes that caption faster than you can. dagthomas built one vision node per provider so you can use whichever key you've got.
How it works
API call, nothing local. Your image goes up, Grok describes it, text comes back - so it needs a key and it bills per image. The grok_model dropdown lists Grok's vision-capable models (the grok-2-vision line plus the grok-4 variants). Vision calls are pricier than text, so model choice matters here more than on the text node.
The controls are the pack's shared style set, identical to the text nodes:
happy_talk(on) - enthusiastic vs. plain description.compress+compression_level(soft / medium / hard) - trim the caption. Useful; a rambling description makes a worse prompt than a tight one.poster- poster-style formatting, off by default.
Optional custom_base_prompt and override swap out the built-in analysis instruction when you want to steer what it describes. One STRING output - wire it into your positive text encode.
Note the shape difference from GptVisionCloner: this node has no fade_percentage and no faded_image output. It's a straight one-image-to-caption node, not a multi-reference blender.
Installing it
ComfyUI Manager: search comfyui_dagthomas, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
The install drags in the whole multi-provider dependency tree, not just the HTTP client this node needs. Then set XAI_API_KEY (or GROK_API_KEY) as an environment variable before starting ComfyUI.
Common issues
No output. Check the key first - XAI_API_KEY has to be exported in the shell that launched ComfyUI. And confirm you picked an actual vision model; a text-only Grok model will refuse an image.
Model 404s. The Grok lineup changes often, and vision models get renamed or retired. If the dropdown model errors, pick a current one, or edit data/grok_models.json in the pack and restart.
Costs creep up. Vision tokens aren't cheap, and reasoning-tier models make it worse for no captioning benefit. If you're batch-captioning, use the lightest vision model that gives you a usable description, and don't run it per video frame unless that's genuinely the goal.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| happy_talk | BOOLEAN | true | — |
| compress | BOOLEAN | false | — |
| compression_level | COMBO | 3 options: soft, medium, hard | |
| poster | BOOLEAN | false | — |
| grok_model | COMBO | grok-2-vision-1212 | 4 options: grok-2-vision-1212, grok-4-0709, grok-4-fast-reasoning, grok-4-fast-non-reasoning |
| custom_base_promptopt | STRING | — | |
| custom_titleopt | STRING | — | |
| overrideopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |