新增 MiniMax H3 Highspeed/Lite 与 Seedance 2.5 Flash,兼容视频参数和旧工作流

This commit is contained in:
Jony
2026-11-17 15:44:20 +08:00
parent af300996b9
commit 209100ecde
16 changed files with 598 additions and 70 deletions
+12 -6
View File
@@ -45,7 +45,8 @@ from comfy_api.latest import InputImpl, io
_BASE_MODELS = ["seedance 2.0", "seedance 2.0 fast", "seedance 2.0 mini", "seedance 2.5"]
# 全能生成视频节点把最新的 2.5 放在模型选择最上方。
_AUTOPASS_BASE_MODELS = ["seedance 2.5", "seedance 2.0", "seedance 2.0 fast", "seedance 2.0 mini"]
_AUTOPASS_BASE_MODELS = ["seedance 2.5", "seedance 2.5 flash", "seedance 2.0", "seedance 2.0 fast", "seedance 2.0 mini"]
_BASE_MODELS_25 = {"seedance 2.5", "seedance 2.5 flash"}
_MODEL_ROUTES = ["海外", "国内"]
_LEGACY_MODEL_ROUTES = {
"海外HC": "海外",
@@ -61,6 +62,7 @@ _CANONICAL_MODELS = {
"seedance 2.0 fast": "seedance-2.0-fast",
"seedance 2.0 mini": "seedance-2.0-mini",
"seedance 2.5": "seedance-2.5",
"seedance 2.5 flash": "seedance-2.5-flash",
}
_CANONICAL_ROUTES = {"国内": "domestic", "海外": "overseas_hc"}
@@ -69,12 +71,16 @@ _MODEL_MATRIX = {
(display_model, display_route): SEEDANCE_MODEL_MATRIX[(model, route)]
for display_model, model in _CANONICAL_MODELS.items()
for display_route, route in _CANONICAL_ROUTES.items()
if (model, route) in SEEDANCE_MODEL_MATRIX
}
_MODEL_CAPABILITIES = {
display_model: {
**SEEDANCE_CAPABILITIES[model],
"routes": set(_MODEL_ROUTES),
"routes": {
display_route for display_route, route in _CANONICAL_ROUTES.items()
if (model, route) in SEEDANCE_MODEL_MATRIX
},
}
for display_model, model in _CANONICAL_MODELS.items()
}
@@ -396,7 +402,7 @@ class SeedanceAutoPass(io.ComfyNode):
if canonical_mode in {"edit", "extend"}:
if len(ref_videos) != 1:
raise ValueError("视频编辑和视频延长必须且只能提供一段参考视频")
if base_model != "seedance 2.5":
if base_model not in _BASE_MODELS_25:
raise ValueError("视频编辑和视频延长仅支持 seedance 2.5")
if not prompt:
raise ValueError("视频编辑和视频延长必须填写提示词")
@@ -415,9 +421,9 @@ class SeedanceAutoPass(io.ComfyNode):
if not (prompt or ref_images or ref_videos or ref_audios):
raise ValueError("多模态模式下,提示词和参考素材不能同时为空")
if base_model != "seedance 2.5" and ref_audios and not (ref_images or ref_videos):
if base_model not in _BASE_MODELS_25 and ref_audios and not (ref_images or ref_videos):
raise ValueError("Seedance 2.0 系列不可单独输入参考音频,须同时提供参考图片或参考视频")
if base_model == "seedance 2.5" and ref_audios and not (ref_images or ref_videos) and not prompt:
if base_model in _BASE_MODELS_25 and ref_audios and not (ref_images or ref_videos) and not prompt:
raise ValueError("Seedance 2.5 仅有参考音频时必须填写提示词")
return canonical_mode
@@ -641,7 +647,7 @@ class SeedanceAutoPass(io.ComfyNode):
asset_creation_mode=normalized["asset_creation_mode"],
output_format=(
output_format
if base_model == "seedance 2.5" and output_format == "mov"
if base_model in _BASE_MODELS_25 and output_format == "mov"
else None
),
)