feat: 接入 Seedance 视频节点并增强图像节点功能

- 新增 Seedance 文生视频、图生视频、首尾帧生视频三个节点
- 新增 seedance_client.py 客户端
- 为 NanoBananaPro、BatchNanoBananaPro、全能生图节点添加「跳过错误」开关,出错时返回占位图以继续队列
- 修复 nano-banana-2-限时特价 动态端点路由(按分辨率选择)
- 统一分辨率选项命名:512 → 512px

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
This commit is contained in:
o1key
2026-04-08 18:32:18 +08:00
co-authored by Claude Sonnet 4.5
parent 9abd175316
commit 03d477648a
9 changed files with 742 additions and 19 deletions
+21 -4
View File
@@ -134,7 +134,7 @@ class BatchNanoBananaPro:
]
# 支持的分辨率列表(全量兜底,实际由 get_all_supported_resolutions() 动态生成)
RESOLUTIONS = ["512", "1K", "2K", "4K"]
RESOLUTIONS = ["512px", "1K", "2K", "4K"]
# 配对模式
PAIRING_MODES = ["按相同图片命名", "1*N", "不配对"]
@@ -298,6 +298,11 @@ class BatchNanoBananaPro:
"保存路径": ("STRING", {
"default": "",
"multiline": False
}),
"跳过错误": ("BOOLEAN", {
"default": False,
"label_on": "打开",
"label_off": "关闭"
})
},
"optional": optional_inputs
@@ -775,6 +780,7 @@ class BatchNanoBananaPro:
模型: str,
宽高比: str,
分辨率: str,
跳过错误: bool = False,
保存路径: str = "",
**kwargs
) -> Tuple[torch.Tensor]:
@@ -1089,19 +1095,30 @@ class BatchNanoBananaPro:
# 用户输入错误 - 打印完整错误信息
error_msg = str(e)
print(f"BatchNanoBananaPro: ❌ {error_msg}")
if 跳过错误:
print("BatchNanoBananaPro: ⚠️ 跳过错误已开启,返回占位图继续执行队列")
placeholder = Image.new('RGB', (512, 512), color=(128, 128, 128))
return (pil_to_tensor([placeholder]),)
raise ValueError(error_msg) from None
except RuntimeError as e:
# 打印完整错误信息
error_full = str(e)
print(f"BatchNanoBananaPro: ❌ {error_full}")
if 跳过错误:
print("BatchNanoBananaPro: ⚠️ 跳过错误已开启,返回占位图继续执行队列")
placeholder = Image.new('RGB', (512, 512), color=(128, 128, 128))
return (pil_to_tensor([placeholder]),)
raise RuntimeError(error_full) from None
except Exception as e:
# 其他未知错误 - 打印完整错误信息
error_msg = str(e)
print(f"BatchNanoBananaPro: ❌ {error_msg}")
if 跳过错误:
print("BatchNanoBananaPro: ⚠️ 跳过错误已开启,返回占位图继续执行队列")
placeholder = Image.new('RGB', (512, 512), color=(128, 128, 128))
return (pil_to_tensor([placeholder]),)
raise type(e)(error_msg) from None
finally: