Nodes/ComfyUI-PromptsO/💀Image with Grok
ComfyUI Node

💀Image with Grok

The least-restricted closed image model, wired into your graph

By S4MUEL-404·Created 11 months ago·Updated 10 months ago· 3
💀Image with Grok
  • images
  • image
  • text
prompt
api_key
seed0

💀Image with Grok is the ComfyUI node that lets you generate images through xAI's API - specifically grok-2-image-1212 - using your own key. If you want Grok's famously loose content policy reachable from your graph, this is the node for it. The community's running joke is that Grok/Aurora images were suspected of leaning on Flux weights under the hood, and regardless of the gossip, it's a genuinely capable closed generator that your local SDXL checkpoint simply isn't.

The value proposition is the same one that makes its Gemini sibling worth having: a closed, non-downloadable model inside a ComfyUI workflow, paid for with your own API key and nothing stored on any third-party server. It's from the same single-author pack (S4MUEL's ComfyUI-PromptsO) and shares the exact install path.

How it works

Straight text-to-image: the node posts your prompt to https://api.x.ai/v1/images/generations with the Grok image model, then downloads the returned image URL, converts it to a ComfyUI IMAGE tensor, and emits it. Two outputs: image (IMAGE) and text (STRING - usually the revised prompt xAI returns alongside the picture).

Feed it the optional images input and the behavior changes: the node first runs your prompt and the reference image(s) through a Grok vision model (grok-2-vision-1212) to produce an enriched prompt, then generates from that. In practice that means you can do image-edit-ish things and the node does the "describe what you see" step for you, which is a genuinely nice touch you don't get in most API wrappers.

Same house style as the rest of the pack: results cache to disk in the pack's cache/ folder keyed by your inputs, and the seed is only sent to the API when it's greater than zero (it defaults to 0 - set it if you want reproducibility).

The inputs that matter

  • prompt - the generation prompt. Grok is an autoregressive model, not a diffusion model, so it rewards describing what you want in natural sentences.
  • api_key - your xAI key, directly on the node. It's embedded in the workflow JSON, so mind that when sharing files.
  • seed - defaults to 0 (no seed sent); set nonzero for consistent reruns.
  • images (optional) - reference image(s); triggers the vision-enhancement step described above.

Outputs: image → any IMAGE socket, text → any STRING socket.

Install

cd ComfyUI/custom_nodes/
git clone https://github.com/S4MUEL-404/ComfyUI-PromptsO.git
cd ComfyUI-PromptsO
pip install -r requirements.txt

Restart ComfyUI, or just search "PromptsO" in ComfyUI Manager and let it handle it. All nodes land under 💀 PromptsO.

Common issues

  • "API key cannot be empty" - it really needs the key on the node; there's no environment-variable path.
  • 401 / 403 from xAI - wrong key, no credits, or the key lacks image-generation scope. Check the xAI console.
  • Text output isn't your exact prompt - xAI returns a revised prompt with the image; that's the text socket. If you expected echo-back, this is normal.
  • Slow first generation - the vision-enhancement path does two API round-trips (describe, then generate). Not a bug, just the price of the reference-image feature.

The honest take: for most people this is a novelty - a way to poke a closed model from inside ComfyUI and see what comes back. But if Grok's content freedom is something you specifically need, this is currently one of the few clean ways to get it in the graph, and the code is simple enough to trust.

Category💀PromptsO

Inputs (4)

NameTypeDefaultDescription
promptSTRINGText prompt for image generation with Grok
api_keySTRINGYour Grok API Key
seedINT00–2147483647Random seed for reproducible results (32-bit limit for Grok API)
imagesoptIMAGEOptional reference images for context

Outputs (2)

NameTypeDescription
imageIMAGE
textSTRING