Vertex AI Gemini
Gemini image models through Vertex AI, no GPU required
- image
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
- video
- text
- image
The one thing your local rig can't give you is Gemini's image models. Nano Banana (Gemini 2.5 Flash Image) and Nano Banana Pro (Gemini 3 Pro Image) have no open weights - you can't download them, so if you want them inside a ComfyUI workflow, they have to come through an API. That's what VertexAIGemini is: a single node that phones Google's Vertex AI and drops the result back onto your canvas as if a local sampler had made it.
The name is a lie in exactly one sense - it does nothing locally. It's a wrapper over the official google-cloud-aiplatform SDK: no model download, no VRAM cost, no GPU. The cost is per call, your inputs leave the machine, and the model refuses whatever Google refuses. If you've wanted a Gemini image or vision model in the graph without the official Partner Nodes' prepaid-credit system, this is a lightweight alternative.
What it actually does
The node bundles one big capability split into five modes via the mode dropdown: Auto, Text Generation, Image Understanding, Image Editing, and Video Analysis. Auto is the default and the one you'll usually leave on - the model figures out what you want from the prompt and whether an image is attached.
The mechanism is straightforward, and I read the source so I can tell you it's clean. It accepts up to nine images, labels each one Image 1:, Image 2: … before sending them - so your prompt can say "keep the subject from Image 1, replace the background with Image 2" and the model knows which is which. A video input is re-encoded to an MP4 and sent as a video part. The response comes back as text plus, for the image models, an inline image that's converted straight into a ComfyUI IMAGE tensor.
One honest detail: aspect_ratio is a hint, not a rule. The node prepends [Output Aspect Ratio: 1024x1024] to your prompt and refuses to resize what comes back - Gemini's image models pick their own output size, so treat the dropdown as guidance, not a guarantee.
The inputs that matter
prompt- your instruction. Multiline, so write naturally.api_key- a Vertex AI API key. This is a required input and the node will refuse to run without it.model- defaults togemini-3-pro-image-preview(Nano Banana Pro). The other choices are the Flash image model, the text-only Flash/Pro models, and a couple of 3.x previews. Note the word preview - model IDs change as Google rolls versions, so re-check the dropdown when things start failing mysteriously.mode- Auto covers most cases; pick Image Editing explicitly when you're doing reference-image work.temperature/max_tokens- generation settings, fine to leave at 0.7 / 2048.
It outputs text (STRING - wire it to a text display or save node) and image (IMAGE - straight into a Save Image or further nodes). A failed call doesn't crash your graph; it returns Error: ... as the text plus a tiny blank 64×64 image. See a small black box? Check the text output for the actual error.
Installing it
Via ComfyUI Manager, search ComfyUI-VertexAI-Gemini. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/JioJe/ComfyUI-VertexAI-Gemini.git
cd ComfyUI-VertexAI-Gemini
pip install -r requirements.txt
Then restart ComfyUI. Two of the dependencies are heavy: google-cloud-aiplatform (the SDK) and opencv-python (used to encode video frames). Both land in the same Python environment as everything else, so don't be surprised by the install time.
Before the key: the README's route is create a Google Cloud project, enable Vertex AI, and generate a key. That's the Vertex key portal - if you've used other Gemini nodes with a Google AI Studio key, that's a different key type and it may not authenticate here.
Where people get burned
- "google-cloud-aiplatform not installed" as your error text means you skipped
pip install -r requirements.txt- the node catches the missing import and reports it instead of dying. - Key rejected. Make sure it's a Vertex AI key from a project with billing and the Vertex AI API enabled. A
TypeErrorabout an unexpectedapi_keyargument means yourgoogle-cloud-aiplatformis too old - upgrade it. - Image Editing mode with no image attached returns an error - the validation requires an input image. Attach one.
- The key sits in your workflow file. Sharing a
.jsonworkflow leaks your credential - and it's exactly the "node that phones home with a key" shape the ecosystem has been burned by once before. I read this one's source: it does what it says, nothing more. Still, delete the key before sharing, and be equally skeptical of the next fresh API pack you find.
For a model you can't run locally, this is a genuinely easy door into the graph. Just keep your key private and your expectations about aspect ratios modest.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| api_key | STRING | Vertex AI API Key | |
| model | COMBO | gemini-3-pro-image-preview | 6 options: gemini-2.5-flash, gemini-2.5-flash-image, gemini-3-pro-image-preview, gemini-3.1-flash-lite-preview, gemini-3.1-pro-preview, gemini-3-flash-preview |
| mode | COMBO | Auto (自动检测) | 5 options: Auto (自动检测), Text Generation (纯文本), Image Understanding (图像理解), Image Editing (图像编辑), Video Analysis (视频分析) |
| aspect_ratio | COMBO | 1024x1024 (1:1) | 提示模型生成指定比例的图像 |
| temperature | FLOAT | 0.700–1 | — |
| max_tokens | INT | 20481–8192 | — |
| imageopt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_6opt | IMAGE | — | |
| image_7opt | IMAGE | — | |
| image_8opt | IMAGE | — | |
| image_9opt | IMAGE | — | |
| videoopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| image | IMAGE | — |