RP Txt2Img (Grok)
XAI's Grok gets the regional prompt treatment
- regional_col_n_row
- divide_mode
- image
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) orgrok-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:
1kor2k. - 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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | grok-imagine-image | 2 options: grok-imagine-image, grok-imagine-image-pro |
| prompt | STRING | RP prompt with ADDCOMM/ADDBASE/ADDCOL/ADDROW syntax, or plain text. | |
| aspect_ratio | COMBO | 16:9 | 14 options: 1:1, 3:4, 4:3, 9:16, 16:9, 2:3, +8 |
| quality | COMBO | medium | 3 options: low, medium, high |
| resolution | COMBO | 1k | 2 options: 1k, 2k |
| debug | BOOLEAN | false | — |
| regional_col_n_rowopt | RP_REGIONS | Connect regional_col_n_row output from RPRatioParser. | |
| divide_modeopt | RP_DIV_MODE | Connect divide_mode output from RPPromptParser. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |