Files
hao-ai-lab-FastVideo/v2/request/tasks.py
T
SolitaryThinker a9e5f6ee7a [refactor] rename package mini_fastvideo → v2
Directory rename (git mv, history preserved) plus rewrite of all references: absolute imports in
tests, the zero-dep runner, docstrings, comments, and the README. No behavior change.

Run: python3 -m pytest v2/tests/ -q ; python3 v2/run_tests.py ; python3 -m v2.examples
2026-07-04 17:15:34 +00:00

33 lines
1.2 KiB
Python

"""TaskType — declared, never inferred (design_v3 §12; design.md §6.1 P7).
The task is part of the typed request and the program branches on it. Heuristics
may only *suggest* a default at the product boundary; the runtime never infers it.
"""
from __future__ import annotations
from enum import Enum
class TaskType(str, Enum):
# --- wired in phase 1 (Wan2.1 / LTX2) ---
T2V = "t2v" # text -> video
I2V = "i2v" # image -> video
TI2V = "ti2v" # text+image -> video
V2V = "v2v" # video -> video
T2I = "t2i" # text -> image (batchable diffusion)
# --- declared now for omni-readiness; implemented in phase 2 ---
T2A = "t2a" # text -> audio (diffusion)
T2VS = "t2vs" # text -> video+sound (joint denoise)
V2W = "v2w" # video -> world rollout (chunked, causal)
A2W = "a2w" # action -> world rollout
REASON = "reason" # AR text reasoning (Cosmos3 reasoner / omni thinker)
@property
def is_world_rollout(self) -> bool:
return self in (TaskType.V2W, TaskType.A2W)
@property
def is_autoregressive(self) -> bool:
return self in (TaskType.REASON,)