Apps Page Background Image
Workflows/Gemini 2.0 EXP

Gemini 2.0 EXP

Save it for me
Operate
@
Angkol_J
from https://github.com/CY-CHENYUE/ComfyUI-Gemini-API/
03/18/2025
ComfyUI
Image Generation
Image Editing
1 / 0
Detailed Introduction

credit goes to : CY_CHENYUE


https://github.com/CY-CHENYUE/ComfyUI-Gemini-API/tree/main


ComfyUI Gemini API

中文 | English

A custom node for ComfyUI to integrate Google Gemini API.


Installation


Method 1: Manual Installation

  1. Clone this repository into your ComfyUI's custom_nodes directory:cd ComfyUI/custom_nodes git clone https://github.com/CY-CHENYUE/ComfyUI-Gemini-API
  2. Install required dependencies:If you're using ComfyUI portable version:..\..\..\python_embeded\python.exe -m pip install -r requirements.txt If you're using your own Python environment:path\to\your\python.exe -m pip install -r requirements.txt

Method 2: Install via ComfyUI Manager

  1. Install and open ComfyUI Manager in ComfyUI
  2. Search for "Gemini API"
  3. Click the install button

Restart ComfyUI after installation


Node Description


Gemini 2.0 image

A node that generates images using the Gemini API.

Input Parameters:

  • prompt (required): Text prompt describing the image you want to generate
  • api_key (required): Your Google Gemini API key (automatically saved after first setup)
  • model: Model selection
  • width: Width of the generated image (512-2048 pixels)
  • height: Height of the generated image (512-2048 pixels)
  • aspect_ratio: Choose image orientation (Free, Landscape, Portrait, Square)
  • temperature: Parameter controlling generation diversity (0.0-2.0)
  • seed (optional): Random seed for reproducible results
  • image (optional): Reference image input for style guidance

Outputs:

  • image: Generated image that can be connected to other ComfyUI nodes
  • API Respond: Text information containing processing logs and API response

Use Cases:

  • Creating unique concept art
  • Generating images from text descriptions
  • Creating style-consistent new images using reference images
  • Image editing based on existing images

Getting API Key

  1. Visit Google AI Studio
  2. Create an account or sign in
  3. Create a new API key in the "API Keys" section
  4. Copy the API key and paste it into the node's api_key parameter (only needed for first use, will be saved automatically)

Temperature Parameter Guide

  • Temperature range: 0.0 to 2.0
  • Lower temperature (near 0): More deterministic, predictable results
  • Higher temperature (near 2): More diverse, creative results
  • Default value 1.0: Balances determinism and creativity

Important Notes

  • API may have usage limits or costs, please refer to Google's official documentation
  • Image generation quality and speed depend on Google's server status and your network connection
  • Reference image feature will send your images to Google services, please be aware of privacy implications
  • API key needs to be entered only once, it will be stored in gemini_api_key.txt in the node directory
  • About Image Orientation:Gemini API generates images based on the selected orientation (landscape, portrait, or square), though the model may not always perfectly follow these instructions.


Details
APPComfyUI(v0.3.26)
Update Time03/18/2025
File Space1 GB
Models0
Extensions16
About This Template

Just use medium hardware to run this . dont forget to get your api 1st at

https://aistudio.google.com/apikey