2 Commits
Author SHA1 Message Date
Alexander Piskun b6f3cf6d9e new gemini-2.0-flash model
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2025-02-10 09:58:53 +02:00
Alexander Piskun f9a25a573f added optional "seed" parameter
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2025-02-08 14:39:32 +02:00
4 changed files with 21 additions and 3 deletions
+12
View File
@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file.
## [1.0.3 - 2025-02-10]
### Added
- New `gemini-2.0-flash` model.
## [1.0.2 - 2025-02-08]
### Added
- Optional `seed` parameter.
## [1.0.1 - 2024-10-20]
### Added
+2 -1
View File
@@ -46,7 +46,8 @@ These nodes integrate the Gemini API into ComfyUI, allowing you to send prompts
- **model (CHOICE)**:
- Selects the Gemini model to use.
- Options:
- `gemini-1.5-flash-002`: Standard model.
- `gemini-1.5-flash-002`: Old version of the fast and free model.
- `gemini-2.0-flash-001`: New version of the free and even better model.
- `gemini-1.5-pro-002`: Pro model with advanced capabilities.
- **api_key (STRING, Optional)**:
- Your Gemini API key.
+6 -1
View File
@@ -1,4 +1,5 @@
import logging
import random
import google.generativeai as genai
from torch import Tensor
@@ -10,12 +11,14 @@ class GeminiNode:
@classmethod
def INPUT_TYPES(cls): # noqa
seed = random.randint(1, 2**31)
return {
"required": {
"prompt": ("STRING", {"default": "Why number 42 is important?", "multiline": True}),
"safety_settings": (["BLOCK_NONE", "BLOCK_ONLY_HIGH", "BLOCK_MEDIUM_AND_ABOVE"],),
"response_type": (["text", "json"],),
"model": (["gemini-1.5-flash-002", "gemini-1.5-pro-002"],),
"model": (["gemini-1.5-flash-002", "gemini-2.0-flash-001", "gemini-1.5-pro-002"],),
},
"optional": {
"api_key": ("STRING", {}),
@@ -25,6 +28,7 @@ class GeminiNode:
"image_3": ("IMAGE",),
"system_instruction": ("STRING", {}),
"error_fallback_value": ("STRING", {"lazy": True}),
"seed": ("INT", {"default": seed, "min": 0, "max": 2**31, "step": 1}),
},
}
@@ -53,6 +57,7 @@ class GeminiNode:
image_3: Tensor | list[Tensor] | None = None,
system_instruction: str | None = None,
error_fallback_value: str | None = None,
**kwargs,
):
self.text_output = None
if not system_instruction:
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "comfyui-gemini"
version = "1.0.1"
version = "1.0.3"
description = "Nodes for Google Gemini API, focusing on backward compatibility and stability within ComfyUI."
license = { file = "LICENSE" }
requires-python = ">=3.10"