Skip to content
Node packVerifiedExternal
Open source

ComfyUI-Gemini-3

Maintainer@xuchenxu168Unratedgrade

Package profile

Status
Verified
Publisher
@xuchenxu168
Source
GitHub

README

ComfyUI-Gemini-3-2

Full-featured, high-performance Google Gemini 3 integration for ComfyUI. This plugin implements all Gemini 3 capabilities with optimized performance.

🔧 Latest Update (2025-11-19): Fixed Gemini API error 400 "Invalid thinkingLevel field". The thinkingLevel parameter is now correctly placed in the API request. See QUICK_FIX_GUIDE.md for details.

🌟 Features

Core Gemini 3 Capabilities

  • ✅ Dynamic Thinking Levels (Low/High) - Control reasoning depth vs latency
  • ✅ Media Resolution Control - Fine-grained control over image/video/PDF processing
  • ✅ Thought Signatures - Maintain reasoning context across API calls
  • ✅ Function Calling - Strict validation with parallel and sequential support
  • ✅ Structured Outputs - JSON schema validation with tools integration
  • ✅ Context Caching - Reduce costs for repeated context (2048+ tokens)
  • ✅ Batch API Support - Process multiple requests efficiently

Multimodal Support

  • 📝 Text generation with advanced reasoning
  • 🖼️ Image understanding and generation (up to 1120 tokens per image)
  • 🎥 Video analysis (70-280 tokens per frame)
  • 🎵 Audio understanding (speech, music)
  • 📄 PDF document processing (optimized at medium resolution)
  • 🔗 URL context and web search integration

Advanced Features

  • 🧠 Multi-step reasoning with thought signature preservation
  • 🔄 Streaming support with real-time updates
  • 🛡️ Safety settings with configurable thresholds
  • 📊 Token counting and usage tracking
  • 🌡️ Temperature control (optimized for Gemini 3)
  • 🔧 System instructions for behavior customization
  • 🔍 Google Search integration for real-time information
  • 💻 Code Execution for mathematical and data analysis tasks

📦 Installation

  1. Clone into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/yourusername/ComfyUI-Gemini-3-2.git
  1. Install dependencies:
cd ComfyUI-Gemini-3-2
pip install -r requirements.txt
  1. Set your API key:
    • Get your API key from Google AI Studio
    • Set environment variable: GEMINI_API_KEY=your_key_here
    • Or configure in the node settings

🎮 Nodes

基础节点 (Basic Nodes)

1. Gemini 3 文本生成 (Text Generation)

Generate text with advanced reasoning capabilities.

  • Inputs: prompt, images, audio, video, PDFs, thinking level, media resolution, system instruction
  • Outputs: text, thought signature, usage metadata
  • Features: Multimodal input, customizable thinking levels, media resolution control

高级节点 (Advanced Nodes)

2. Gemini 3 函数调用 (Function Calling)

Execute function calls with strict validation and thought signature preservation.

  • Inputs: prompt, function declarations, thought signatures, function responses
  • Outputs: function calls (JSON), updated thought signature, text response
  • Features: Parallel and sequential function calling, multi-step reasoning

3. Gemini 3 结构化输出 (Structured Output)

Generate JSON with schema validation and tool integration.

  • Inputs: prompt, JSON schema, enable Google Search/Code Execution/URL Context
  • Outputs: validated JSON output, usage metadata
  • Features: Strict JSON schema validation, integrated with built-in tools

4. Gemini 3 聊天 (Chat)

Multi-turn conversation with automatic context management.

  • Inputs: message, chat history, system instruction, max output tokens
  • Outputs: response, updated chat history (with thought signatures), usage metadata
  • Features: Automatic history management, thought signature preservation

流式节点 (Streaming Nodes)

5. Gemini 3 流式生成 (Streaming Generation)

Real-time streaming generation with progressive output.

  • Inputs: prompt, thinking level, system instruction, max output tokens
  • Outputs: full text, thought signature, stream chunks info
  • Features: Real-time response streaming, chunk-by-chunk proce

Nodes in this pack

12 nodes
  • Gemini3Chat
  • Gemini3ContextCache
  • Gemini3FunctionCalling
  • Gemini3ImageEditorPrompt
  • Gemini3MultiModalAnalysis
  • Gemini3SafetySettings
  • Gemini3StreamingGeneration
  • Gemini3StructuredOutput
  • Gemini3TextGeneration
  • Gemini3UseCachedContent
  • Gemini3WithCodeExecution
  • Gemini3WithGoogleSearch

Sources

2 sources
GitHubSourceVersion 60552c0e5fa3e2293e1ad3ba4a3efd9b01faaf46
github.com/xuchenxu168/ComfyUI-Gemini-3

Verified Oct 5

GitHubSource
github.com/xuchenxu168/ComfyUI-Gemini-3

Verified Nov 6

Source excerpts

1 excerpt

Source context: Repo xuchenxu168/ComfyUI-Gemini-3