feat: streamline storyboard video rows

This commit is contained in:
2026-05-19 15:11:08 +08:00
parent 980d252815
commit 64a9673fa1
3 changed files with 278 additions and 115 deletions

View File

@@ -5671,7 +5671,7 @@ class RefineStoryboardReq(BaseModel):
class BatchGenerateStoryboardReq(BaseModel):
count_per_row: int = 4
concurrency: int = 4
concurrency: int = 1
model: str = ""
size: str = "720x1280"
@@ -6242,7 +6242,7 @@ def _batch_generate_worker(job_id: str, req: BatchGenerateStoryboardReq) -> None
count = max(1, min(12, int(req.count_per_row or 4)))
concurrency = max(1, min(8, int(req.concurrency or 4)))
frames = list(job.frames)
update(job, message=f"整片视频候选生成已启动 · 0/{len(frames)}", error="")
update(job, message=f"整片视频候选排队生成已启动 · 0/{len(frames)}", error="")
done = 0
def submit_one(frame: KeyFrame) -> None:
@@ -6297,7 +6297,7 @@ def batch_generate_all_storyboard(job_id: str, req: BatchGenerateStoryboardReq)
if not job.frames:
raise HTTPException(400, "no frames to generate")
threading.Thread(target=_batch_generate_worker, args=(job_id, req), daemon=True).start()
update(job, message=f"整片视频候选生成已启动 · {len(job.frames)} 条分镜 · 每条 {max(1, min(12, int(req.count_per_row or 4)))} 个候选")
update(job, message=f"整片视频候选排队生成已启动 · {len(job.frames)} 条分镜 · 每条 {max(1, min(12, int(req.count_per_row or 4)))} 个候选")
return job