Publish current ComfyUI O1Key code baseline
Replace the prior release tree with the current plugin, frontend, tests, and documentation. Document retired node IDs and the public Gitea update source.
This commit is contained in:
@@ -15,6 +15,7 @@ from PIL import Image
|
||||
|
||||
from ..utils.image_utils import tensor_to_pil, encode_image_to_base64
|
||||
from ..utils.file_types import FileData
|
||||
from ..utils.config import get_runtime_config_signature
|
||||
from ..clients.gemini_flash_client import GeminiFlashClient
|
||||
from ..models_config import get_enabled_flash_models
|
||||
|
||||
@@ -67,6 +68,7 @@ class GoogleGemini:
|
||||
def __init__(self):
|
||||
"""初始化节点"""
|
||||
self.client = None
|
||||
self._client_config_signature = None
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
@@ -559,9 +561,11 @@ class GoogleGemini:
|
||||
|
||||
try:
|
||||
# 初始化 API 客户端
|
||||
if self.client is None:
|
||||
config_signature = get_runtime_config_signature()
|
||||
if self.client is None or config_signature != self._client_config_signature:
|
||||
try:
|
||||
self.client = GeminiFlashClient()
|
||||
self._client_config_signature = config_signature
|
||||
except ValueError as e:
|
||||
raise ValueError(f"初始化失败: {str(e)}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user