RP Txt2Img (Gemini)
The free-tier regional renderer
- regional_col_n_row
- divide_mode
- image
What it is
The same RP-to-natural-language bridge as the OpenAI node, pointed at Google's Gemini image API. Your ADDCOL regions become position phrases in one composed sentence - "1girl on the upper-left side, 1boy on the upper-right side, interacting naturally in the same scene, seamless composition" - and Gemini renders it. The hook is the price: Gemini has a free API tier, which makes this the cheapest way to iterate on a regional composition without touching your GPU.
The differences from the other API nodes
- model:
gemini-3.1-flash-image-preview(default),gemini-3-pro-image-preview, orgemini-2.5-flash-image. Flash is fast and cheap; the pro preview is for higher-effort renders. - aspect_ratio: the full useful set - 1:1, 3:4, 4:3, 9:16, 16:9, 4:5, 5:4, 2:3, 3:2, 21:9.
- image_size:
1K/2K/4K- Gemini's unique lever, letting you push past the OpenAI size presets. - debug: prints the converted prompt and response info, worth switching on once to confirm your RP syntax translated the way you think it did.
Setup
The pack itself installs the usual way - ComfyUI Manager → search "ComfyUI_RP_Cast", or git clone https://github.com/AISeDam/ComfyUI_RP_Cast into custom_nodes/ and restart. Then drop the key in Settings → ComfyUI-RP-Cast → Configuration (gemini_api_key), grabbed from aistudio.google.com/apikey. Built-in urllib again - no pip packages. Output is a normal IMAGE for your preview/save nodes. Connect regional_col_n_row and divide_mode from the ratio/parser nodes so the position labels match your real grid.
When to use it
As a draft engine. Punch in your RP prompt, get a fast 2K render that mostly respects the layout, and decide whether the composition is worth a full local pass. Gemini follows positional language well, but it's still a translator rather than a region-conditioner - same caveat as the OpenAI node. If you're on a strict budget, this is the one of the three I'd reach for first.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | gemini-3.1-flash-image-preview | 3 options: gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, gemini-2.5-flash-image |
| prompt | STRING | RP prompt with ADDCOMM/ADDBASE/ADDCOL/ADDROW syntax, or plain text. | |
| aspect_ratio | COMBO | 16:9 | 10 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4 |
| image_size | COMBO | 1K | 3 options: 1K, 2K, 4K |
| 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 | — |