Nodes/ComfyUI_RP_Cast/RP Txt2Img (Gemini)
ComfyUI Node

RP Txt2Img (Gemini)

The free-tier regional renderer

By AISeDam·Created 4 months ago·Updated 4 months ago· 4
RP Txt2Img (Gemini)
  • regional_col_n_row
  • divide_mode
  • image
modelgemini-3.1-flash-image-preview
prompt
aspect_ratio16:9
image_size1K
debugfalse

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, or gemini-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.

CategoryRP Cast

Inputs (7)

NameTypeDefaultDescription
modelCOMBOgemini-3.1-flash-image-preview3 options: gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, gemini-2.5-flash-image
promptSTRINGRP prompt with ADDCOMM/ADDBASE/ADDCOL/ADDROW syntax, or plain text.
aspect_ratioCOMBO16:910 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4
image_sizeCOMBO1K3 options: 1K, 2K, 4K
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