|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"""checkpoints config options: |
|
|
|
|
|
CHECKPOINT_LOCAL: store at local file system |
|
|
|
|
|
""" |
|
|
import attrs |
|
|
|
|
|
from cosmos_predict1.utils import config |
|
|
from cosmos_predict1.utils.config import make_freezable |
|
|
from cosmos_predict1.utils.lazy_config import LazyDict |
|
|
|
|
|
|
|
|
@make_freezable |
|
|
@attrs.define(slots=False) |
|
|
class ExperimentConfig: |
|
|
|
|
|
enabled: bool = True |
|
|
|
|
|
project: str = None |
|
|
|
|
|
groups: list[str] = None |
|
|
|
|
|
name_prefixes: list[str] = None |
|
|
|
|
|
|
|
|
@make_freezable |
|
|
@attrs.define(slots=False) |
|
|
class TokenizerCheckpointConfig(config.CheckpointConfig): |
|
|
|
|
|
experiment: ExperimentConfig = attrs.field(factory=ExperimentConfig) |
|
|
|
|
|
|
|
|
jit_config = config.JITConfig( |
|
|
enabled=True, |
|
|
input_shape=[1, 3, 1024, 1024], |
|
|
) |
|
|
|
|
|
experiment_config = ExperimentConfig( |
|
|
enabled=True, |
|
|
project="cosmos_tokenizer", |
|
|
groups=["debug", "video"], |
|
|
name_prefixes=[ |
|
|
f"{base}{size}" if base in ["CI", "DI"] else f"{base}{size}_Causal" |
|
|
for base in ["CI", "DI", "CV", "DV"] |
|
|
for size in [256, 320, 480, 512, 720, 1024, 1080] |
|
|
] |
|
|
+ [f"{base}{size}" for base in ["CV", "DV"] for size in [256, 320, 512, 720]] |
|
|
+ ["mock"], |
|
|
) |
|
|
|
|
|
CHECKPOINT_LOCAL: LazyDict = attrs.asdict( |
|
|
TokenizerCheckpointConfig( |
|
|
save_iter=5000, |
|
|
jit=jit_config, |
|
|
experiment=experiment_config, |
|
|
) |
|
|
) |
|
|
|