auto-save 2026-05-21 15:25 (~2)
This commit is contained in:
18
api/main.py
18
api/main.py
@@ -8255,16 +8255,16 @@ def agent_submit_shot(
|
||||
return ids[0]
|
||||
|
||||
|
||||
def agent_compose_final(run: AgentRun, ordered_ids: list[str]) -> None:
|
||||
d = agent_run_dir(run.id)
|
||||
def agent_compose_final(agent: AgentRun, ordered_ids: list[str]) -> None:
|
||||
d = agent_run_dir(agent.id)
|
||||
d.mkdir(parents=True, exist_ok=True)
|
||||
final_dir = job_dir(run.job_id) / "final"
|
||||
final_dir = job_dir(agent.job_id) / "final"
|
||||
final_dir.mkdir(parents=True, exist_ok=True)
|
||||
final = final_dir / f"agent-{run.id}.mp4"
|
||||
final = final_dir / f"agent-{agent.id}.mp4"
|
||||
concat_file = d / "concat.txt"
|
||||
paths: list[Path] = []
|
||||
for video_id in ordered_ids:
|
||||
p = job_dir(run.job_id) / "storyboard_videos" / video_id / "video.mp4"
|
||||
p = job_dir(agent.job_id) / "storyboard_videos" / video_id / "video.mp4"
|
||||
if p.exists() and p.stat().st_size > 0:
|
||||
paths.append(p.resolve())
|
||||
if not paths:
|
||||
@@ -8287,11 +8287,11 @@ def agent_compose_final(run: AgentRun, ordered_ids: list[str]) -> None:
|
||||
"-vf", "select='not(mod(n,120))',scale=180:320,tile=12x1",
|
||||
"-frames:v", "1", str(contact),
|
||||
])
|
||||
run.contact_sheet_url = f"/agent-runs/{run.id}/contact.jpg"
|
||||
agent.contact_sheet_url = f"/agent-runs/{agent.id}/contact.jpg"
|
||||
except Exception as e:
|
||||
agent_log(run, f"抽帧审片图生成失败:{str(e)[:180]}", level="warn")
|
||||
run.final_video_url = f"/agent-runs/{run.id}/final.mp4"
|
||||
save_agent_run(run)
|
||||
agent_log(agent, f"抽帧审片图生成失败:{str(e)[:180]}", level="warn")
|
||||
agent.final_video_url = f"/agent-runs/{agent.id}/final.mp4"
|
||||
save_agent_run(agent)
|
||||
|
||||
|
||||
def agent_run_worker(run_id: str, product_refs: list[dict]) -> None:
|
||||
|
||||
Reference in New Issue
Block a user