파이프라인 state추가

This commit is contained in:
jaehwang committed 2026-09-08 10:34:33 +09:00
1 parent ee8b940dca
commit 2d4201ce9e
9 files changed
+69 -54

No files matched your search

+5 -2
View File
@@ -1,7 +1,7 @@
from dataclasses import dataclass
from PIL import Image
from pydantic import BaseModel, Field
from pydantic import BaseModel, ConfigDict, Field
Rect = tuple[float, float, float, float]
@@ -17,9 +17,12 @@ class MaskSpec(BaseModel):
class HybridSpec(BaseModel):
# register는 BaseModel 속성과 겹쳐 이름을 바꾸고 alias로 원본 키를 받음
model_config = ConfigDict(populate_by_name=True)
clip: str | None = None
clip_crop: str | None = None # "x0,y0,w,h" — 9:16 캔버스에 얹힌 클립용
register: bool = False
register_frames: bool = Field(False, alias="register")
class LayerConfig(BaseModel):
+32
View File
@@ -0,0 +1,32 @@
"""DB 잡 레코드의 진행도로 쓰이는 파이프라인 단계 상태
실행 순서대로 선언됨
마지막 COMPLETED는 종료 표시
"""
from enum import StrEnum
class PosterAliveState(StrEnum):
DETECT = "detect"
NARRATION_TEXT = "narration_text"
MOTION = "motion"
TTS = "tts"
BGM = "bgm"
I2V = "i2v"
RENDER = "render"
COMPLETED = "completed"
class PlayreelState(StrEnum):
FETCH = "fetch"
SPLIT = "split"
UPSCALE = "upscale"
ANALYZE = "analyze"
MOTION = "motion"
NARRATION = "narration"
TTS = "tts"
BGM = "bgm"
I2V = "i2v"
HYBRID = "hybrid"
COMPOSE = "compose"
REVIEW = "review"
COMPLETED = "completed"