Vertex AI Image (Gemini 3/Imagen)
Nano Banana inside your graph, without the VRAM bill
- vertex_config
- image_input
- image_2
- image_3
- image_4
- generation_config
- image
- raw_response
- generation_config
This is the node people actually install this pack for. It calls Google's Gemini image models - Gemini 3 Pro Image, the model the community knows as Nano Banana Pro - and drops the result back into your graph as a normal IMAGE tensor, as if a local sampler had made it. Under the hood it's an HTTP client with your credentials baked in: your prompt and reference images leave the machine, go to Vertex AI, and come back as PNGs.
That tradeoff is the whole story. There are no weights to download and no GPU required - 4K native output from a model you can't run locally, ever, because Google opens no generator - our closed-source-models doc has the full context on that front. The price is per-image: Nano Banana Pro runs roughly $0.04–0.24 depending on resolution, every image carries an invisible SynthID watermark, and Google's content filter is not negotiable. You use this node for a capability local can't offer, not as a default.
How it works
You feed it a vertex_config (from VertexAIAuth), a prompt, and it POSTs to the Vertex AI :streamGenerateContent endpoint. The interesting parts:
- Up to 4 reference images -
image_inputplusimage_2,image_3,image_4. Each is base64-encoded inline and sent alongside your text, which gives you a genuine image-to-image path to Gemini's native generation. This is the killer feature - Nano Banana Pro's whole reputation is built on how well it follows reference images. negative_prompt- the code appends it to your prompt as an inline--negative_prompt=...flag rather than a separate API field. Works, but it's blunt.- Generation parameters -
aspect_ratio(1:1, 16:9, 9:16, 4:3, 3:4, 21:9),output_resolution(1K/2K/4K),output_format(PNG/JPEG), andperson_generation(ALLOW_ADULT/ALLOW_ALL/DONT_ALLOW) all go into theimageConfigpayload. Set them on the node - they override anything a connectedgeneration_configobject carries.
Three outputs: image (the tensor, ready to wire into a preview or save node), raw_response (the full JSON blob from Google, handy for debugging), and generation_config (the payload that was actually sent, so you can inspect or pass it on).
The inputs a beginner actually touches
vertex_config- from the Auth node. Non-negotiable.prompt- your text prompt, multiline.model_name- dropdown of Gemini image models.custom_model_name- the escape hatch: type any model string here and it overrides the dropdown.
Installing it
ComfyUI Manager → search comfyUI_Vertex_API, or:
cd ComfyUI/custom_nodes
git clone https://github.com/linfen0/comfyUI_Vertex_API.git
cd comfyUI_Vertex_API
pip install -r requirements.txt
Restart ComfyUI, then add VertexAIAuth, run it once so your credentials save, and wire its vertex_config into this node's vertex_config input.
Where people get burned
- Black 512×512 image, no error - that's the node's "the API returned no image" fallback. Usually a safety block on your prompt, a bad
model_name, or a reference image Google rejected. Check theraw_responseoutput; it'll tell you what actually happened. - Malformed URL on the service-account path - if you auth with a service account JSON, the code reads a
locationfield out of that file to build the API URL, and a standard Google service-account JSON doesn't have one. The API-key route avoids this entirely, which is why the README recommends it for personal use. - Cost creep - each run is a metered call. A session of failed generations is a session of billed generations; check Google Cloud billing before you iterate for an hour.
- The filter is the model - no amount of prompt trickery undoes Google's refusal. If the prompt wouldn't pass ImageFX, it won't pass here.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| vertex_config | VERTEX_CONFIG | — | |
| prompt | STRING | A cinematic shot of a cyberpunk detective | — |
| model_name | COMBO | gemini-3-pro-image-preview | 3 options: gemini-3-pro-image-preview, gemini-3.0-pro-preview, gemini-2.5-flash-image |
| aspect_ratio | COMBO | 1:1 | 6 options: 1:1, 16:9, 9:16, 4:3, 3:4, 21:9 |
| person_generation | COMBO | ALLOW_ADULT | 3 options: ALLOW_ADULT, ALLOW_ALL, DONT_ALLOW |
| output_resolution | COMBO | 1K | 3 options: 1K, 2K, 4K |
| output_format | COMBO | image/png | 2 options: image/png, image/jpeg |
| image_inputopt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| generation_configopt | GENERATION_CONFIG | — | |
| negative_promptopt | STRING | — | |
| custom_model_nameopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| raw_response | STRING | — |
| generation_config | GENERATION_CONFIG | — |