From 4b366db142db3b8cb6695919aefc9a935dcd267c Mon Sep 17 00:00:00 2001
From: hit-cxf <2024111082@stu.hit.edu.cn>
Date: Mon, 06 Apr 2026 17:44:55 +0800
Subject: [PATCH] 添加了设置剧集数量的功能
---
aigc-director/aigc-claw/backend/core/orchestrator.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/aigc-director/aigc-claw/backend/core/orchestrator.py b/aigc-director/aigc-claw/backend/core/orchestrator.py
index 1cd3a9f..1fa6121 100644
--- a/aigc-director/aigc-claw/backend/core/orchestrator.py
+++ b/aigc-director/aigc-claw/backend/core/orchestrator.py
@@ -205,7 +205,6 @@
return
# 如果有 progress 回调(纯文字阶段),也定期保存
- # 这样前端可以实时看到文字生成进度
current_time = time.time()
if current_time - last_save_time["time"] >= SAVE_INTERVAL:
last_save_time["time"] = current_time
@@ -220,10 +219,14 @@
try:
result = await agent.process(input_data, intervention=intervention)
+ if not isinstance(result, dict):
+ logger.error(f"[execute_stage] Agent {stage.value} returned non-dict result: {type(result)}")
+ result = {"payload": result}
+
state.artifacts[stage.value] = result.get("payload")
- # 第三阶段修改分镜时:同步更新第四、第五阶段的相关内容
- if stage.value == "storyboard" and intervention and "modified_storyboard" in intervention:
+ # 只有在 storyboard 阶段明确有修改时才执行同步
+ if stage.value == "storyboard" and isinstance(intervention, dict) and "modified_storyboard" in intervention:
modified_shots = intervention["modified_storyboard"]
if isinstance(modified_shots, list):
shot_durations = {s.get('shot_id'): s.get('duration', 10)
--
Gitblit v1.8.0