From 2f48fc1d4c80a4c25a04d5f4e1e6c19fbb3528db Mon Sep 17 00:00:00 2001
From: hit-cxf <2024111082@stu.hit.edu.cn>
Date: Thu, 23 Apr 2026 11:53:33 +0800
Subject: [PATCH] fix: add kimi to models.ts
---
aigc-director/aigc-claw/backend/tool/video_client.py | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/aigc-director/aigc-claw/backend/tool/video_client.py b/aigc-director/aigc-claw/backend/tool/video_client.py
index bb87bd2..99959f8 100644
--- a/aigc-director/aigc-claw/backend/tool/video_client.py
+++ b/aigc-director/aigc-claw/backend/tool/video_client.py
@@ -15,10 +15,12 @@
from tool.video_wan import WanVideoClient
from tool.image_jimeng import JiMengClient
from tool.video_kling import KlingVideoClient
+ from tool.video_seedance import SeedanceVideoClient
except ImportError:
from video_wan import WanVideoClient
from image_jimeng import JiMengClient
from video_kling import KlingVideoClient
+ from video_seedance import SeedanceVideoClient
logger = logging.getLogger(__name__)
@@ -60,12 +62,18 @@
base_url=kling_base_url,
)
+ # Seedance 客户端
+ self.seedance_client = SeedanceVideoClient(
+ api_key=os.getenv("ARK_API_KEY"),
+ base_url=os.getenv("ARK_BASE_URL"),
+ )
+
def generate_video(
self,
prompt: str,
image_path: str,
save_path: str,
- model: str = "wan2.6-i2v-flash",
+ model: str = "wan2.7-i2v",
duration: int = 5,
shot_type: str = "multi",
sound: str = "",
@@ -90,7 +98,7 @@
RuntimeError: 生成或下载失败
"""
if not model:
- model = "wan2.6-i2v-flash"
+ model = "wan2.7-i2v"
if Config.PRINT_MODEL_INPUT:
print("---- VIDEO GENERATION REQUEST ----")
@@ -111,6 +119,8 @@
return self._generate_jimeng(prompt, image_path, save_path, model, video_ratio)
elif "kling" in model_lower:
return self._generate_kling(prompt, image_path, save_path, model, duration, sound)
+ elif "seedance" in model_lower:
+ return self._generate_seedance(prompt, image_path, save_path, model, duration)
else:
return self._generate_wan(prompt, image_path, save_path, model, duration, shot_type)
@@ -187,3 +197,21 @@
duration=duration,
sound=sound,
)
+
+ def _generate_seedance(
+ self,
+ prompt: str,
+ image_path: str,
+ save_path: str,
+ model: str,
+ duration: int = 5,
+ ) -> str:
+ """通过 Seedance 模型生成视频"""
+ logger.info(f"VideoClient: 路由至 Seedance model={model}")
+ return self.seedance_client.generate_video(
+ prompt=prompt,
+ image_path=image_path,
+ save_path=save_path,
+ model=model,
+ duration=duration,
+ )
--
Gitblit v1.8.0