NS Grok Imagine Image
XAI's image model, inside your ComfyUI graph
- client
- output_image
NS Grok Imagine Image is the text-to-image / image-edit node for xAI's Grok Imagine models, wired into the symbiotica-ai/comfyui-nodes pack. If you want Grok's image output sitting next to your local Flux in the same graph - as a draft, a reference, or a finished asset - this is the node that calls the API and drops the result back as a normal IMAGE tensor.
It's a straight API wrapper, the "closed model, no local weights" case from docs/knowledge/external-api-nodes.md: you cannot download Grok Imagine, so every call costs money and happens in the cloud. What you get in exchange is a frontier image model that needs zero VRAM, zero local download, and produces a result on the same wire format as any local generator - so everything downstream (upscalers, compositors, captioners) just works.
The inputs that matter
- client (required) - a GROK_API_CLIENT from NS Grok Client. No client, no call.
- model -
grok-imagine-image-pro,grok-imagine-image(default), orgrok-2-image-1212. Pro is the flagship; the base model is cheaper. The oldergrok-2-image-1212is there for parity. - prompt (required, multiline) - the description, or the edit instruction when you supply an image.
- aspect_ratio - 13 options from 1:1 through 16:9, 9:16, and phone ratios like 19.5:9 and 20:9. This is the one to set for vertical formats.
- num_images - 1–10 images per call.
- image_url (optional) - a URL to an image to edit. Empty means pure text-to-image. Note it takes a URL, not a local file path - if your image is on disk, host it somewhere reachable first (or feed the generated result from another node's save).
One output: output_image (IMAGE), ready for any image node.
Install
Part of symbiotica-ai/comfyui-nodes - ComfyUI Manager search "Symbiotica", or clone + pip install -r requirements.txt. No ffmpeg needed here. You need an xAI API key (https://console.x.ai) with billing, wired via NS Grok Client. Restart ComfyUI after installing.
Gotchas
It's metered: pay-per-image, and the Pro model costs more. Set num_images to 1 while you're dialing in a prompt, then widen - nobody wants to pay for four nearly-identical misses. The image_url requirement trips people up more than anything: it's URL-only, so a local path won't work, and a hot-linked URL that blocks xAI's fetch will fail too. And while the API does its own content moderation, treat the model like any API image gen - a refusal comes back as an error string, not a generated image, so check the node's console output when you get nothing back.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| client | GROK_API_CLIENT | — | |
| model | COMBO | grok-imagine-image | Model to use for generation |
| prompt | STRING | Text description of the image to generate or edit instruction | |
| aspect_ratio | COMBO | 1:1 | Aspect ratio of the generated image |
| num_images | INT | 11–10 | Number of images to generate (1-10) |
| image_urlopt | STRING | Optional: Image URL for editing (leave empty for text-to-image) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_image | IMAGE | — |