Extensions/ComfyUI-VertexAI-Gemini
ComfyUI Extension

ComfyUI-VertexAI-Gemini

ComfyUI-VertexAI-Gemini

By JioJe·Created 5 months ago·Updated 5 months ago· 3
JioJe/ComfyUI-VertexAI-Gemini
Nodes1
On cloudLocal install
CategoryAI/Google
Stars3
Updated5 months ago
Readme

ComfyUI-VertexAI-Gemini

ComfyUI-VertexAI-Gemini is a custom node that connects ComfyUI to Google Vertex AI Gemini models for text generation, image understanding, image editing, and video analysis.

Features

  • Supports multiple Gemini model variants exposed by Vertex AI
  • Accepts up to 9 input images for multi-image prompting and editing
  • Injects Image 1, Image 2, ... labels to make cross-image instructions more reliable
  • Accepts frame sequences for video analysis workflows
  • Provides aspect-ratio hints without force-resizing the final image

Installation

cd ComfyUI/custom_nodes
git clone https://github.com/JioJe/ComfyUI-VertexAI-Gemini.git
cd ComfyUI-VertexAI-Gemini
pip install -r requirements.txt

Optional Proxy Configuration

If your environment requires a proxy to access Google services, set the standard environment variables before launching ComfyUI:

set http_proxy=http://127.0.0.1:7897
set https_proxy=http://127.0.0.1:7897

Vertex AI API Key

Create a Google Cloud project, enable Vertex AI, and generate an API key. Paste that key into the node's api_key input inside ComfyUI.

Inputs

  • prompt: text prompt or editing instruction
  • api_key: Vertex AI API key
  • model: target Gemini model
  • mode: auto, text, image understanding, image editing, or video analysis
  • aspect_ratio: output composition hint
  • image to image_9: optional image inputs
  • video: optional video frame sequence input

Outputs

  • text: model text response
  • image: generated or edited image

Example Prompt

Keep the subject from Image 1 unchanged, replace the background with the environment from Image 2, and keep the overall color tone consistent.

Notes

  • For video analysis, install opencv-python
  • Aspect ratio is treated as a prompt hint, not a hard resize rule
  • This project is released under the MIT License