fix: isolate storyboard videos by row

This commit is contained in:
2026-05-19 15:24:30 +08:00
parent 64a9673fa1
commit e03c5db3fd
4 changed files with 100 additions and 34 deletions

View File

@@ -347,6 +347,7 @@ class GeneratedVideo(BaseModel):
id: str
provider_id: str = ""
frame_idx: int
storyboard_row_idx: int | None = None
prompt: str
model: str = ""
status: Literal["queued", "in_progress", "completed", "failed"] = "queued"
@@ -376,6 +377,7 @@ class StoryboardScene(BaseModel):
visual_mode: Literal["person_only", "person_product", "product_only", "environment"] = "person_product"
needs_product: bool = True
needs_subject: bool = True
storyboard_row_idx: int | None = None
subject_brief: str = ""
skg_copy_en: str = ""
skg_copy_zh: str = ""
@@ -5609,6 +5611,7 @@ class UpdateStoryboardReq(BaseModel):
visual_mode: Literal["person_only", "person_product", "product_only", "environment"] = "person_product"
needs_product: bool = True
needs_subject: bool = True
storyboard_row_idx: int | None = None
subject_brief: str = ""
skg_copy_en: str = ""
skg_copy_zh: str = ""
@@ -5637,6 +5640,7 @@ class GenerateStoryboardVideoReq(BaseModel):
duration: float = 4
count: int = 1
seed: int | None = None
storyboard_row_idx: int | None = None
first_image: dict | None = None
last_image: dict | None = None
product_images: list[dict] = Field(default_factory=list)
@@ -6203,6 +6207,7 @@ def _enqueue_storyboard_videos(job: Job, frame: KeyFrame, req: GenerateStoryboar
id=local_id,
provider_id="",
frame_idx=frame.index,
storyboard_row_idx=req.storyboard_row_idx,
prompt=variant_prompt,
model=model,
status="queued",
@@ -7275,6 +7280,7 @@ def update_storyboard(job_id: str, idx: int, req: UpdateStoryboardReq) -> Job:
visual_mode=req.visual_mode,
needs_product=bool(req.needs_product),
needs_subject=bool(req.needs_subject),
storyboard_row_idx=req.storyboard_row_idx,
subject_brief=req.subject_brief.strip(),
skg_copy_en=req.skg_copy_en.strip(),
skg_copy_zh=req.skg_copy_zh.strip(),