entrypoint
¶
Modules¶
fastvideo.train.entrypoint.dcp_to_diffusers
¶
Convert a DCP training checkpoint to a diffusers-style model directory.
Works on a single GPU regardless of how many GPUs were used for training (DCP handles resharding automatically).
Usage (no torchrun needed)::
python -m fastvideo.train.entrypoint.dcp_to_diffusers --checkpoint /path/to/checkpoint-1000 --output-dir /path/to/diffusers_output
Or with torchrun (also fine)::
torchrun --nproc_per_node=1 -m fastvideo.train.entrypoint.dcp_to_diffusers --checkpoint ... --output-dir ...
The checkpoint must contain metadata.json (written by
CheckpointManager). If the checkpoint predates metadata
support, pass --config explicitly to provide the training
YAML.
Functions¶
fastvideo.train.entrypoint.dcp_to_diffusers.convert
¶
convert(*, checkpoint_dir: str, output_dir: str, config_path: str | None = None, role: str = 'student', overwrite: bool = False) -> str
Load a DCP checkpoint and export as a diffusers model.
Returns the path to the exported model directory.
Source code in fastvideo/train/entrypoint/dcp_to_diffusers.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |
fastvideo.train.entrypoint.misc
¶
Modules¶
fastvideo.train.entrypoint.misc.wan_ode_init_conversion
¶
Convert Self-Forcing ode_init.pt to HuggingFace diffusers format.
The official ode_init.pt from
https://huggingface.co/gdhe17/Self-Forcing/resolve/main/checkpoints/ode_init.pt
stores weights under {"generator": {<original_wan_keys>}}.
This script converts those keys to diffusers
WanTransformer3DModel format, verifies them against a reference
model, and saves a complete diffusers-compatible model directory
(transformer + scheduler + vae + text_encoder + tokenizer).
Usage
python -m fastvideo.train.entrypoint.misc.wan_ode_init_conversion --input /path/to/ode_init.pt --output /path/to/WanOdeInit --base-model Wan-AI/Wan2.1-T2V-1.3B-Diffusers
fastvideo.train.entrypoint.train
¶
YAML-only training entrypoint.
Usage::
torchrun --nproc_per_node=<N> -m fastvideo.train.entrypoint.train --config path/to/run.yaml
Any unknown --dotted.key value arguments are applied as
overrides to the YAML config before parsing. For example::
torchrun --nproc_per_node=8 -m fastvideo.train.entrypoint.train --config path/to/run.yaml --training.distributed.num_gpus 8 --training.optimizer.learning_rate 1e-5
Functions¶
fastvideo.train.entrypoint.train.run_training_from_config
¶
run_training_from_config(config_path: str, *, dry_run: bool = False, overrides: list[str] | None = None) -> None
YAML-only training entrypoint (schema v2).