优化全能创作
Deploy dev / deploy (push) Successful in 39s

This commit is contained in:
Azmat@qq.com
2026-09-29 15:15:54 +08:00
parent 1130ecd4ba
commit c687ec4bbd
16 changed files with 632 additions and 258 deletions
+7 -5
View File
@@ -648,12 +648,12 @@ def finish_generating_message(message: CreationMessage, *, assets: list[dict], m
model_ids.append(model_id)
memory["person_cast_model_ids"] = model_ids
memory["person_model_id"] = model_id
pending = int(memory.get("person_cast_pending") or cast_total or 1)
pending = int(memory.get("person_cast_pending") or 1)
pending = max(0, pending - 1)
memory["person_cast_pending"] = pending
memory["person_cast_total"] = int(memory.get("person_cast_total") or cast_total or 1)
if pending > 0:
# 还有其它角色定妆图在生成:继续等待,不打断用户确认
# 兼容历史上已经并发提交的角色任务。
memory["person_source_pending"] = True
memory.pop("person_source_ready", None)
memory.pop("person_confirm_pending", None)
@@ -667,7 +667,8 @@ def finish_generating_message(message: CreationMessage, *, assets: list[dict], m
return message
memory["person_source_pending"] = False
memory["person_source_ready"] = True
from .creation_agent import locked_person_references
memory["person_source_ready"] = len(locked_person_references(conversation)) >= cast_total
memory["person_confirm_pending"] = True
conversation.memory = memory
conversation.status = CreationConversation.Status.RUNNING
@@ -684,9 +685,10 @@ def finish_generating_message(message: CreationMessage, *, assets: list[dict], m
upload = "我上传宠物参考图"
upload_label = "上传其他宠物"
elif total > 1:
identity = str(original_payload.get("cast_role_identity") or f"第{cast_index}位出镜角色")
confirm_text = (
f"已生成 {total} 位出镜角色定妆图。长视频会按这些图分别锁脸,"
"避免前后形象漂移。你看这组角色合适吗?是否使用这些角色继续创作?"
f"第 {cast_index}/{total} 位【{identity}】的角色图已生成。"
"你看这位角色合适吗?确认后再准备下一位;所有角色都会分别锁脸。"
)
reply_hint = "回复「使用这个角色」继续,或说明想调整哪一位…"
regen = "重新生成一个角色"