Commit Graph
25 Commits
Author SHA1 Message Date
shaoxiongduan 92cc893cfc trackwan: 14B teacher pipeline, layer-wise track LR, and overfit tooling
Training:
- finetune.py: optional track/base param groups (WANTRACK_TRACK_GROUP) so the
  track pathway can take a different LR (WANTRACK_TRACK_LR_MULT); patch_embedding
  gradient masked to the track slot [:, 36:]. Raises if nothing matches.
- track_warmup.py callback: hold the pretrained DiT at lr 0 while the track
  pathway warms up, then ramp it back in.

14B configs + held-alloc launchers:
- finetune_wantrack_{synth_sparse_fixed,synth_sparse_random,openvid_sparse_merged_bias,
  synth_stage2}_14b + openvid_14b_{warmup,lwlr} + 1.3B stage2 configs.
- run_wan14b_held.sh (held alloc + auto-restart + rank cleanup, per-stage WANTRACK
  env), acquire_nodes.sh, chain_stepAB.sh, run_stepB_seed.sh, run_stepC_merge.sh,
  watch_gate.sh, run_synth_stage2_slurm.sh.

Init / diagnostics:
- convert_trackwan_init_v2.py: --pe-src to lift patch_embedding[:, 36:] and
  --track-src to lift track_encoder together (co-adapted merge); sharded-source support.
- check_gate_growth.py, gradient_flow_analysis.py, gradient_flow_summarize.py.

Data pipeline: segment_tracks.py sharding; decode/segment/tracks slurm scripts;
precompute_null_text, two_track_val, cfg_ablation, lwlr_experiment.

Inference: app_multi_trace.py updates.
2026-07-23 03:52:56 +00:00
shaoxiongduan ac919b1c87 [feat] WanTrack: OpenVid preprocess + Wan2.2 synthetic-gen pipeline, training configs, first-frame saturation fix
- data_pipeline: SAM+CoTracker preprocessing, sharded Slurm launchers, OpenVid download/filter,
  and a data-parallel Wan2.2-T2V-A14B synthetic video generator with the first-frame
  over-brightness fix (over-generate 129 -> drop first 8 -> keep 121).
- examples/train: OpenVid bidir/stage2/stage3 launchers + finetune YAMLs (sparse, merged,
  merged_bias, stage2v2 hi-lr, stage3A/B/C).
- research_log: first-frame saturation root-cause writeup (DiT position-0 latent, not VAE decode).
- fastvideo: trackwan model / track-encoder / preprocessing updates, dcp_to_diffusers export, FA4.
2026-07-14 08:58:22 +00:00
shaoxiongduan 8bc4e538d0 [feat] WanTrack tooling: sparse interactive app + warmstart YAML
examples/inference/gradio/trackwan/app_action.py:
  Bring the interactive drawing app in line with the sparse training
  regime our overfit runs used (WANTRACK_SPARSE=1). New 'Track budget'
  radio: 'dense' keeps the old full 50x50 grid; 'sparse' (new default)
  builds a much smaller [Tpx, num_moving + num_bg, 2] tensor -- the
  moving handle points from the drawn path + num_bg random background
  points from the training grid (seeded by the seed slider). New
  'num_bg' slider (0-60, default 20) matches WANTRACK_EXTRA_RANDOM=20.
  Overlay logic updated to draw every point in sparse mode instead of
  grid-strided subsampling that assumed N==2500.

examples/train/scenario/worldmodel/finetune_wantrack_synth_sparse_random_warmstart.yaml:
  Test config for the curriculum idea: start from sparse-fixed@1000
  and let random-sampling sparse training take over. Compared cold-
  start sparse-random (~0.8%) vs warmstart (~3.2%) vs fixed (~8.8%)
  divergence.
2026-07-07 03:24:11 +00:00
shaoxiongduan 495dd27d33 [feat] WanTrack: golf/synth overfit YAMLs for A/B ablations
Add the training configs used for the golf-overfit and 20-clip synthetic
overfit series exercising every combination of the recent changes:

  golf_nonzero / golf_overfit_nonzero     -- non-zero-init proj ablation
  synth_generic / synth_varied             -- prompt-conditioning ablation
                                              (generic vs per-clip caption)
  synth_varied_d64                         -- id_dim=64 (paper spec)
  synth_varied_d64_nobias                  -- + bias=False on track head
  synth_varied_d64_nobias_fixed            -- + WANTRACK_FIXED_SAMPLE=1
  synth_curriculum                         -- random-sample warmstart from
                                              a fixed-sample checkpoint
  synth_varied_full_val                    -- max_train_steps=1 harness that
                                              regenerates all 20 val clips
                                              in 3 modes from a checkpoint
  synth_sparse_fixed / synth_sparse_random -- 1-per-object + 20 background
                                              extras (Yongqi's recipe)

All resume from the trackwan_1.3b_i2v_control_init family (or the
d64_nobias variant) and enable the new joint text+motion CFG (w_t=3,
w_m=1.5) in track_validation.
2026-07-06 04:11:32 +00:00
shaoxiongduan aea5cadb5f [feat] WanTrack val: MotionStream-aligned joint text+motion CFG
Wire compositional text + motion CFG into TrackValidationCallback._sample,
following MotionStream Eq. 2 exactly:

  v_no_text   = v(∅, c_m)           # drop text, keep tracks
  v_no_motion = v(c_t, ∅)           # keep text, drop tracks
  v_base      = α·v_no_text + (1-α)·v_no_motion,  α = wt/(wt+wm)
  v̂           = v_base + wt·(v_full - v_no_text) + wm·(v_full - v_no_motion)

3 NFE/step when either wt or wm != 1. At wt=wm=1 collapses to single v_full
(no CFG). No-track counterfactual branch keeps plain text CFG only (motion
CFG undefined without tracks). "Unconditional" text = zero embedding, matching
WANTRACK_TEXT_DROP training.

Configs updated to MotionStream's recommended wt=3.0, wm=1.5.
2026-07-04 03:22:52 +00:00
shaoxiongduan c6d0233eab [bugfix] WanTrack: track subsampling was a no-op when max_points == N
_augment_tracks gated the object-coverage + low-rank-weighted + uniform draw on
`0 < max_points < N`, so with the default WANTRACK_MAX_POINTS=2500 and the full
2500-track grid (max_points == N) the entire subsample block was skipped -- the
model saw all 2500 tracks every step and only chunk-masking ran. Gate on
`min_points < N` instead so K~U[1000,2500] actually samples (verified: kept
1179/1437/1573 across steps, was a constant 2500).

Also: TrackValidation now applies the same sampler (loads object_ids/track_weights,
runs _augment_tracks deterministically) so validation is conditioned on -- and
overlays -- the sampled subset, not the full grid. Env-gated WANTRACK_DEBUG=1 logs
per-step sampling stats (kept count, object coverage, coord ranges). Adds a
single-video (golf) overfit config for debugging.
2026-07-03 08:18:44 +00:00
shaoxiongduan de8e9e20b4 [feat] WanTrack: EPIC-200 / static-EPIC-200 / Wan-200-sampler training configs
Sampler-on finetune configs (coverage + low-rank-weighted + uniform track
sampling, p_mask chunk masking) across three data regimes: unfiltered
egocentric EPIC-200, camera-static-filtered EPIC-200 (single kitchen), and the
Wan-200 synthetic set re-run with the sampler on (vs the AUG=0 overfit baseline).
2026-07-03 07:08:33 +00:00
shaoxiongduan 21f25791e2 [feat] WanTrack: MotionStream-aligned track sampling + motion-CFG + Wan-200 cfg
- _augment_tracks: default random 1000-2500 track sampling (was 1-200), contiguous
  chunk masking (was per-frame), diversity weighting (favor moving/unique tracks,
  keep some static), and an object-coverage hook (>=1 track per SAM segment via
  optional object_ids). Sampling ON by default; CFG dropout now default off.
- trackwan_infer.generate: motion classifier-free guidance (guidance_scale) using
  the base no-tracks I2V branch as the unconditional.
- test_motion_cfg.py: quick guidance-scale EPE sweep.
- finetune_wantrack_wan200.yaml: 50->200 data-scale run (same params).
2026-07-02 07:05:14 +00:00
shaoxiongduan b588be05d1 [feat] WanTrack: DROID track-conditioning dataset + overfit config
convert_droid.py builds a set where the first frame is similar but motion is
diverse, the design that forces trace reliance: it scans DROID (LeRobot mirror),
clusters frame-0 embeddings, and writes the tightest cluster as 121-frame libx264
mp4s + manifest with ONE generic caption, dropping straight into extract_tracks ->
i2v_track preprocess. Adds finetune_wantrack_droid_overfit.yaml (Fun-Control init,
WANTRACK_AUG=0 clean overfit, fresh output_dir) and gitignores .gradio/.
2026-07-01 06:36:43 +00:00
shaoxiongduan 8af0c43a65 [fix] WanTrack: enforce I2V via Fun-InP base + CLIP cross-attention
The overfit teacher ignored the first frame (validation looked T2V): the
init came from FastWan2.1-T2V-1.3B, whose image-conditioning channels are
zero/untrained and which has no CLIP pathway, so first-frame and track
conditioning received ~no gradient.

Re-base on Wan2.1-Fun-1.3B-InP (pretrained concat-I2V + CLIP):
- convert_trackwan_init: widen patch-embed base_in(36)->52, keep the 36
  pretrained image-cond channels, zero-init only the 16 track channels;
  inherit image_dim from the base config; merge sharded safetensors.
- trackwan config: image_dim=1280 builds the DiT image_embedder.
- preprocess: compute + store clip_feature (CLIP frame-0 embedding) and
  add image_encoder/image_processor to required modules.
- schema: clip_feature_{bytes,shape,dtype} in pyarrow_schema_i2v_track.
- wantrack / track_validation / trackwan_infer: feed
  encoder_hidden_states_image through train, validation, and inference.
- yaml: point at the Fun-InP init + re-preprocessed data.

Verified: step-0 validation reproduces the GT first frame (PSNR ~24-26 dB
vs ~9-11 before), i.e. I2V is enforced before any training.
2026-07-01 06:36:41 +00:00
shaoxiongduan 34a0a81be1 [feat] WanTrack: bidirectional I2V + point-track (MotionStream) finetune + eval
TrackWan = Wan2.2 + MotionStream point-track motion control. Stage-1 bidirectional
I2V finetune (text kept), built on the new modular trainer.

- DiT: TrackWanTransformer3DModel (52ch in = 16 noisy + 20 I2V + 16 track), TrackEncoder
  (sinusoidal track-ID embed, scatter, 4x temporal conv, zero-init head); config + registry.
- Trainer: WanTrackModel wrapper, i2v_track preprocess pipeline + pyarrow schema,
  TrackValidationCallback, finetune_wantrack_i2v.yaml.
- data_pipeline/: video gen (Wan2.2-A14B), CoTracker3 track extraction, 52ch init
  conversion, synthetic track authoring, controllability (CoTracker EPE) eval, standalone
  inference, Gradio demo.
- eval: motion.cotracker_epe metric. research_log/ lab notebook.
- fixes: FA3 flash_attn_func tuple unwrap; decord fallback for removed torchvision.io.read_video;
  preprocess flush write_remainder.
2026-07-01 06:36:40 +00:00
Junda SuandPeiyuan Zhang 5854aec2ce [feat] Add Wan RL DiffusionNFT training (#1450)
Co-authored-by: Peiyuan Zhang <a1286225768@gmail.com>
2026-06-11 21:18:59 -07:00
Mingjia Huo 63030cf6ec [fix] Fix causal self-forcing attention settings (#1355) 2026-05-17 22:59:47 -07:00
Kaiqin Kongandmergify[bot] 773d44b875 [misc] Rename MatrixGame to MatrixGame2 (#1357)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2026-05-17 22:57:03 -07:00
1df513922f [feat] Add minimal LoRA finetuning support to the YAML training stack (#1242)
Co-authored-by: alexzms <3036648523@qq.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2026-05-17 14:49:13 -07:00
d6dfe95466 [feat] FastVideo World Model Training (#1179)
Co-authored-by: mignonjia <mhuo@ucsd.edu>
Co-authored-by: alexzms <3036648523@qq.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2026-05-11 05:13:12 +00:00
f633e30ebb [feat]: add LongCat bidirectional finetuning support (#1244)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
Co-authored-by: alexzms <3036648523@qq.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2026-05-09 12:20:43 -07:00
alexzms d14d5aadea [feat] Cosmos 2.5 training support in fastvideo.train (#1224) 2026-05-01 01:15:02 +00:00
alexzms 2085a4fc4a [bugfix]: fix VAE temporal tiling blend corruption in tiled_encode (#1181) 2026-03-29 23:12:42 +00:00
alexzms 30129a3350 [misc]: reorganize training configs and add documentation (#1177) 2026-03-26 16:38:31 -07:00
alexzms 71bfc13d75 [feat]: add HunyuanVideo model plugin for fastvideo/train framework (#1175) 2026-03-24 16:49:51 -07:00
alexzms 14261bc98c [feat] pre-commit support 120 col num (#1167) 2026-03-11 20:19:30 -07:00
alexzms d92858659d [feat] Self-Forcing methods in refactored training infra (#1164) 2026-03-09 20:20:59 -07:00
1a383f3f66 [refactor] train v1 clean up
Co-authored-by: alexzms <3036648523@qq.com>
Co-authored-by: Peiyuan Zhang <a1286225768@slurm-h200-204-215.slurm-compute.tenant-slurm.svc.cluster.local>
2026-03-09 18:58:56 -07:00
alexzmsandPeiyuan Zhang bc27a032c5 [feat] Refactor training framework into fastvideo/train (#1159)
Co-authored-by: Peiyuan Zhang <a1286225768@gmail.com>
2026-03-09 15:16:42 -07:00