Nodes/ComfyUI_RP_Cast/RP Txt2Img (Grok)
ComfyUI Node

RP Txt2Img (Grok)

XAI's Grok gets the regional prompt treatment

By AISeDam·Created 4 months ago·Updated 4 months ago· 4
RP Txt2Img (Grok)
  • regional_col_n_row
  • divide_mode
  • image
modelgrok-imagine-image
prompt
aspect_ratio16:9
qualitymedium
resolution1k
debugfalse

What it is

The newest of the pack's three API renderers, pointed at xAI's Grok image API. Same RP-to-natural-language conversion as the OpenAI and Gemini nodes: your ADDCOL regions become "on the upper-left side"-style phrases in a single composed sentence, and the pack computes the labels from your actual grid layout. Connect regional_col_n_row and divide_mode from the ratio parser and prompt parser, and the position phrasing follows your real region geometry rather than a guess.

The differences

  • model: grok-imagine-image (default) or grok-imagine-image-pro.
  • aspect_ratio: an unusually wide set - the usual 1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, plus tall and cinematic formats like 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1, and auto.
  • quality: low / medium / high.
  • resolution: 1k or 2k.
  • debug: prints the converted prompt.

Setup

The pack installs the standard way - ComfyUI Manager → search "ComfyUI_RP_Cast", or git clone https://github.com/AISeDam/ComfyUI_RP_Cast into custom_nodes/ and restart. Then the key goes in Settings → ComfyUI-RP-Cast → Configuration (grok_api_key), from console.x.ai. urllib only, no extra packages, no GPU. Output is a normal IMAGE. The prompt widget takes either full RP syntax or plain text - if it has no ADDCOL/ADDROW markers, the node just forwards it without the region conversion.

Honest take

Grok's image models are good at detailed instruction-following, which matters here because the whole trick is a long positional sentence. The tall formats (19.5:9 and friends) are genuinely fun for phone-wallpaper layouts the other two nodes can't express. But like the other API nodes, this is a translation layer, not true regional conditioning - the local sampler plus detailer still wins on attribute isolation. Reach for Grok when you want its rendering style or its oddball aspect ratios, not when hair color must stay on the correct head at all costs.

CategoryRP Cast

Inputs (8)

NameTypeDefaultDescription
modelCOMBOgrok-imagine-image2 options: grok-imagine-image, grok-imagine-image-pro
promptSTRINGRP prompt with ADDCOMM/ADDBASE/ADDCOL/ADDROW syntax, or plain text.
aspect_ratioCOMBO16:914 options: 1:1, 3:4, 4:3, 9:16, 16:9, 2:3, +8
qualityCOMBOmedium3 options: low, medium, high
resolutionCOMBO1k2 options: 1k, 2k
debugBOOLEANfalse
regional_col_n_rowoptRP_REGIONSConnect regional_col_n_row output from RPRatioParser.
divide_modeoptRP_DIV_MODEConnect divide_mode output from RPPromptParser.

Outputs (1)

NameTypeDescription
imageIMAGE