methods
¶
Modules¶
fastvideo.tests.train.methods.test_wan_causal_dfsft
¶
Per-method GPU smoke test: WanCausalModel + DiffusionForcingSFTMethod.
Mirrors test_wan_finetune.py for the diffusion-forcing SFT
(DFSFT) algorithm on the causal Wan transformer. The harness is
intentionally identical so the two tests are easy to compare and so
future per-method tests can copy this template verbatim.
DFSFT samples inhomogeneous timesteps per chunk (chunk_size=3
in the fixture) and is the natural training counterpart of the
WanCausalModel plugin.
fastvideo.tests.train.methods.test_wan_finetune
¶
Per-method GPU smoke test: WanModel + FineTuneMethod.
Establishes the per-method test pattern for fastvideo/train:
- Instantiate the model + method via their public constructors
(no
Trainersetup, no FSDP wrapping). - Feed a synthetic
raw_batchdict throughmethod.single_train_step()+method.backward(). - Assert that the loss is finite and that the first transformer block received a finite, non-zero gradient.
The first block's gradient is the last one computed during backprop, so a healthy grad there implies the full forward + chain-rule path is intact. Keeping the assertion to a single block keeps the reference surface tiny — a later PR layers a device-keyed grad-norm regression on top of this same harness.