Custom ComfyUI nodes for Google Gemini image generation and editing using the Gemini web interface.
Security Warning
This node accesses your browser cookies for authentication. Please be aware: - Local use only - Do not run on shared computers or public networks - Cookie extraction - The app scans your browser for Google session cookies - Plain text storage - Cookies may be stored in memory during session - No SSL verification - Requests may not verify SSL certificates
Use at your own risk. Only run this on your personal, private machine.
Note: This is released as-is with no active maintenance planned. Pull Requests are welcome if you'd like to fix issues or improve the project!
cd ComfyUI/custom_nodes
git clone https://github.com/Koko-boya/Comfyui-GeminiWeb.git
Or download and extract to ComfyUI/custom_nodes/Comfyui-GeminiWeb
cd Comfyui-GeminiWeb
pip install -r requirements.txt
Modern Chrome/Edge (v127+) uses App-Bound Encryption (v20) which requires special handling.
The simplest and most reliable method:
__Secure-1PSID and __Secure-1PSIDTS valuesStore cookies in a file for reuse:
gemini_cookies.txt in the node folder:
__Secure-1PSID=your_value_here
__Secure-1PSIDTS=your_value_hereFor automatic v20 cookie decryption (Edge only tested):
Why Admin? Chrome/Edge 127+ use App-Bound Encryption (v20) which requires SYSTEM-level access to decrypt. Currently only Edge is tested.
Unified node for all Gemini operations.
| Input | Type | Description |
|---|---|---|
| mode | ENUM | text_to_image, image_to_image, or chat |
| prompt | STRING | Text prompt |
| auth_method | ENUM | auto_cookies, cookie_file, or manual |
| image_1 | IMAGE | Primary input image |
| image_2 | IMAGE | Optional reference image |
| image_3 | IMAGE | Optional reference image |
| image_4 | IMAGE | Optional reference image |
| image_5 | IMAGE | Optional reference image |
| model | ENUM | Gemini model to use |
| timeout | INT | API timeout (30-600 seconds) |
| image_filter | ENUM | all, no_watermark, or watermarked |
| cookie_1PSID | STRING | Cookie (manual mode) |
| cookie_1PSIDTS | STRING | Cookie (optional) |
| Output | Type | Description |
|---|---|---|
| image | IMAGE | Generated/edited image(s) |
| response_text | STRING | Text response from Gemini |
| thinking | STRING | Model thinking/reasoning |
| Filter | Description |
|---|---|
all |
Return all generated images |
no_watermark |
Return only non-watermarked images (JPEG) |
watermarked |
Return only watermarked images (PNG) |
[GeminiWeb (text_to_image)] → [Preview Image]
[Load Image 1] → image_1 ─┐
[Load Image 2] → image_2 ─┼→ [GeminiWeb (image_to_image)] → [Save Image]
[Load Image 3] → image_3 ─┘
[Load Image] → image_1 → [GeminiWeb (chat)] → [Text Output]
| Model | Description |
|---|---|
unspecified |
Default model (uses Gemini's default) |
gemini-3-pro |
Pro model |
gemini-3-thinking |
Thinking model |
gemini-3-flash |
Fast model (default) |
| Issue | Solution |
|---|---|
| "Cookie expired" | Re-login to gemini.google.com and update cookies |
| "v20 App-Bound Encryption" | Use manual method (recommended) or run as Admin with Edge |
| "No browser cookies found" | Use manual or cookie_file method (recommended) |
| "Cookie file not found" | Create gemini_cookies.txt with your cookies |
| "No images generated" | Try adding "generate" to your prompt |
| Import errors | Run pip install -r requirements.txt |
| Region restrictions | Image generation may not be available in all regions |
| v20 not decrypting | Run as Admin + close Edge + PythonForWindows installed |
If you encounter problems, please open an issue with the prompt you used, or enable debug_mode in the node and attach the debug_request.txt file (found in the node's directory under custom_nodes/Comfyui-GeminiWeb/).
⚠️ Do NOT share
debug_response.txt— it may contain your location and other personal details from Google.
This project is licensed under AGPL-3.0 (same as the vendored Gemini-API library).
See LICENSE for details.
The gemini_webapi/ directory contains code from Gemini-API by HanaokaYuzu, licensed under AGPL-3.0.
$ claude mcp add Comfyui-GeminiWeb \
-- python -m otcore.mcp_server <graph>