Nodes/comfyui-PD_comfy-api-node/PD: Gemini Pro Image (ComfyUI Key)
ComfyUI Node

PD: Gemini Pro Image (ComfyUI Key)

Gemini Pro Image — the 'thinking' flagship, inside your graph

By 7BEII·Created 10 months ago·Updated 9 days ago· 2
PD: Gemini Pro Image (ComfyUI Key)
  • images
  • files
  • image
  • text
api_key
promptA futuristic city with flying cars
modelgemini-3-pro-image-preview
aspect_ratioauto
resolution1K
response_modalitiesIMAGE+TEXT
seed42
system_promptYou are an expert image-generation engine. You must ALWAYS produce an image. Interpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition. If a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept. Prioritize generating the visual representation above any text, formatting, or conversational requests.

This is the flagship. PD: Gemini Pro Image runs Gemini 3 Pro Image - the model Google brands as Nano Banana Pro - through ComfyUI's hosted API. It's the one with the "thinking mode" that reasons about your prompt before drawing, native up to 4K, and support for up to 14 reference images. If you want the best closed-model image generation Comfy can proxy and you have the credits to spend, this is the node.

Why you'd reach for it

Nano Banana Pro is the heavyweight of the Gemini image line. The KB's closed-source-models essay notes it's the flagship with "thinking mode" and 4K native output, priced around $0.039–0.24 per image depending on resolution. What the web UI won't easily give you is this: reference-image chaining, routing its output into an upscaler or a video pipeline, and keeping the whole thing inside a versioned workflow. It's the node you reach for when the answer needs to be right, not just fast - at a per-image cost you should check before you batch.

How it works

Identical plumbing to the pack's other Gemini nodes: the node builds a Gemini payload, base64-encodes up to 14 reference images as inline data, and POSTs to https://api.comfy.org/proxy/vertexai/gemini/gemini-3-pro-image-preview with your ComfyUI key in the X-API-KEY header. The model's native upscaler handles 2K/4K (the resolution tooltip is explicit: "for 2K/4K the native Gemini upscaler is used"). The response comes back with images and text, and this node surfaces the text separately.

Inputs that matter

  • api_key - your ComfyUI API key from comfy.org/api-keys.
  • prompt - describes either what to generate or the edits to apply; this model genuinely reads long instructions.
  • aspect_ratio - auto matches your input image's ratio, which is the right default for img2img work.
  • resolution - 1K (default), 2K, or 4K; note the upscaler note above.
  • response_modalities - IMAGE or IMAGE+TEXT.
  • seed - present, but treat results as stochastic through a cloud proxy.
  • images - up to 14 reference images; this is the feature that separates Pro from the Flash line.
  • system_prompt - preloaded with the standard image-engine instruction, editable.

Outputs are worth noticing: image and text (not info like most siblings). The text output carries the model's textual response - turn on IMAGE+TEXT and you can wire that into a ShowText node to see the model's reasoning.

Installing it

Part of the comfyui-PD_comfy-api-node pack, installed once:

cd ComfyUI/custom_nodes
git clone https://github.com/7BEII/comfyui-PD_comfy-api-node.git

Restart and find it under PD_Tools/Image_Generation. The README's pip install -r requirements.txt doesn't correspond to any real file - the actual dependency (comfy_api_nodes) ships with ComfyUI Desktop.

Troubleshooting

  • Black output image - the error placeholder; read text/info for the real message.
  • Empty or rejected reference images - multi-image requests are stricter than single ones; make sure the inputs are valid IMAGE tensors (the README reminds you they should be B×H×W×C, RGB).
  • Cost creep at 4K - resolution is the main price lever, and "thinking" adds time. For iteration, stay at 1K; go to 4K only for finals.

Honest take: this is the most capable image node in the pack, and also the most likely to surprise you with the bill if you leave it on 4K. It earns its place in final-frame pipelines - just don't make it your sampler.

CategoryPD_Tools/Image_Generation

Inputs (10)

NameTypeDefaultDescription
api_keySTRING
promptSTRINGA futuristic city with flying carsText prompt describing the image to generate or the edits to apply
modelCOMBOgemini-3-pro-image-preview1 options: gemini-3-pro-image-preview
aspect_ratioCOMBOautoIf set to 'auto', matches your input image's aspect ratio
resolutionCOMBO1KTarget output resolution. For 2K/4K the native Gemini upscaler is used
response_modalitiesCOMBOIMAGE+TEXTChoose 'IMAGE' for image-only output, or 'IMAGE+TEXT' for both
seedINT420–18446744073709550000
imagesoptIMAGEOptional reference image(s) (up to 14)
filesoptGEMINI_INPUT_FILES
system_promptoptSTRINGYou are an expert image-generation engine. You must ALWAYS produce an image. Interpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition. If a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept. Prioritize generating the visual representation above any text, formatting, or conversational requests.Foundational instructions that dictate an AI's behavior

Outputs (2)

NameTypeDescription
imageIMAGE
textSTRING