FV's _img2tokens was packing video latent patches as spatial-major '(pT pH pW C)' (channels innermost), but the DiT's video_embedder Linear weight was trained on upstream's channel-major '(C pT pH pW)' layout. Upstream's MagiDataProxy uses UnfoldNd, which is implemented via a grouped-channel conv whose output reshape is channel-major (in_channels * kernel_size_numel ordering, channels slowest). The spatial-major layout silently permuted the in-features of every video token, scrambling the entire video feature representation and producing pure colorful-blob noise from the basic example. The pipeline parity test could not catch this because it imports FV's build_packed_inputs for the upstream side too, so both sides consumed equally-permuted tokens and agreed on garbage at production scale (T=26 frames, ~3120 video tokens), while reporting healthy ~0.5%/step drift on the tiny synthetic (2,6,6) latent. Fix is a one-character change in the einops rearrange pattern. unpack_tokens stays spatial-major because the DiT's final_linear_video is trained to emit (pT pH pW C), matching upstream's SingleData.depack_token_sequence at data_proxy.py:220-228. Validated end-to-end: examples/inference/basic/basic_magi_human.py now produces coherent video at the standard 480x256 / 32-step / seed 42 prompt -- woman on a park bench reading a book under green trees, matching prompt. Output mp4 size dropped from ~932KB (incompressible noise) to ~222KB (coherent compressible video). Closes magi-human OQ-6. Notes for follow-up: - OQ-11 (NEW): test_magi_human_pipeline_parity.py:222 should drive the upstream side through real MagiDataProxy.process_input so the parity test catches packing-layout regressions natively.
Local Tests
Local-only parity, smoke, and component tests for FastVideo model ports. They compare FastVideo against the official reference implementations and are skipped in CI; run them locally on a single GPU (or CPU where noted).
For the CI-backed test suite, see fastvideo/tests/.
Layout
Tests are organized by model family, one directory per port. Each family
directory follows the layout produced by the
add-model-prep skill:
tests/local_tests/<family>/
├── README.md # reference assets, setup, test inventory
├── __init__.py
└── test_<family>_<component>_*.py
Families
| Family | Workload | Dir |
|---|---|---|
| Hunyuan GameCraft | T2V / I2V | gamecraft/ |
| GEN3C | T2V | gen3c/ |
| Kandinsky-5 | T2V | kandinsky5/ |
| LTX-2 | T2V (+ audio) | ltx2/ |
| Stable Diffusion 3.5 | T2I | sd35/ |
| Stable Audio Open 1.0 | T2A | stable_audio/ |
| Wan2.2 | I2V | wan22/ |
Running a family
pytest tests/local_tests/<family>/ -v -s
See each family's README.md for setup (clones, weights, env vars, gated
tokens) and the per-component parity coverage.
Adding a new family
Run the add-model-prep
skill from the FastVideo repo root. It scaffolds the family directory and
README.md and stages reference clones + weights. (In-progress ports may also
add a PORT_STATUS.md from the same skill template; remove it once the port
lands.)