Add Nano Banana 2.1 and preserve image workflow values
This commit is contained in:
@@ -530,7 +530,7 @@ class O1keyImageGenerator(io.ComfyNode):
|
||||
io.Combo.Input(
|
||||
"模型",
|
||||
options=UNIFIED_IMAGE_MODEL_OPTIONS,
|
||||
default="Nano Banana 2",
|
||||
default="Nano Banana 2.1",
|
||||
socketless=True,
|
||||
),
|
||||
io.Combo.Input(
|
||||
@@ -663,7 +663,7 @@ class O1keyImageGenerator(io.ComfyNode):
|
||||
"在线搜索",
|
||||
options=["关闭", "打开"],
|
||||
default="关闭",
|
||||
tooltip="仅 Nano Banana 2 生效;打开时发送 google_search=true。",
|
||||
tooltip="仅 Nano Banana 2 / 2.1 生效;打开时发送 google_search=true。",
|
||||
socketless=True,
|
||||
),
|
||||
io.Boolean.Input(
|
||||
@@ -688,7 +688,7 @@ class O1keyImageGenerator(io.ComfyNode):
|
||||
async def execute(
|
||||
cls,
|
||||
prompt: str,
|
||||
模型: str = "Nano Banana 2",
|
||||
模型: str = "Nano Banana 2.1",
|
||||
模型线路: str = "畅速",
|
||||
思考等级: str = "低",
|
||||
分辨率: str = UNIFIED_IMAGE_SMART_RESOLUTION,
|
||||
@@ -731,7 +731,7 @@ class O1keyImageGenerator(io.ComfyNode):
|
||||
raise ValueError("缩放图片参数无效")
|
||||
if 在线搜索 not in {"关闭", "打开"}:
|
||||
raise ValueError("在线搜索参数无效")
|
||||
google_search = 模型 == "Nano Banana 2" and 在线搜索 == "打开"
|
||||
google_search = 模型 in {"Nano Banana 2.1", "Nano Banana 2"} and 在线搜索 == "打开"
|
||||
|
||||
image_count = int(生图数量)
|
||||
if is_gpt_image_model(模型):
|
||||
|
||||
Reference in New Issue
Block a user