|
1 | 1 | # World-Model: Matrix-Game 2.0 I2V |
2 | 2 |
|
3 | | -Three training scenarios for the Matrix-Game 2.0 I2V world model on the |
4 | | -new YAML-driven trainer (`fastvideo/train/entrypoint/train.py`). |
| 3 | +Training scenarios for the Matrix-Game 2.0 I2V world model on Solaris (Minecraft) |
| 4 | +data and Zelda data, using the new YAML-driven trainer |
| 5 | +(`fastvideo/train/entrypoint/train.py`). |
| 6 | + |
| 7 | +## Solaris Configs |
| 8 | + |
| 9 | +| Config | Method | Student | Notes | |
| 10 | +|---|---|---|---| |
| 11 | +| `solaris/finetune_i2v.yaml` | `FineTuneMethod` | `MatrixGame2Model` (bidirectional) | Multi-step SFT from `mg_bidirectional_Solaris`. | |
| 12 | +| `solaris/dfsft_causal_i2v.yaml` | `DiffusionForcingSFTMethod` | `MatrixGame2CausalModel` | Diffusion-Forcing SFT with chunkwise timesteps. | |
| 13 | +| `solaris/self_forcing_causal_i2v.yaml` | `SelfForcingMethod` | `MatrixGame2CausalModel` | Matrix-Game 2.0 DMD/Self-Forcing distillation; teacher = bidirectional, critic = bidirectional. | |
| 14 | + |
| 15 | +## Zelda Configs |
5 | 16 |
|
6 | 17 | | Config | Method | Student | Notes | |
7 | 18 | |---|---|---|---| |
8 | | -| `finetune_i2v.yaml` | `FineTuneMethod` | `MatrixGame2Model` (bidirectional) | Multi-step SFT from `mg_bidirectional_Solaris`. | |
9 | | -| `dfsft_causal_i2v.yaml` | `DiffusionForcingSFTMethod` | `MatrixGame2CausalModel` | Diffusion-Forcing SFT with chunkwise timesteps. | |
10 | | -| `self_forcing_causal_i2v.yaml` | `SelfForcingMethod` | `MatrixGame2CausalModel` | DMD/Self-Forcing distillation; teacher = bidirectional, critic = bidirectional. | |
| 19 | +| `zelda/finetune_i2v.yaml` | `FineTuneMethod` | `MatrixGame2Model` (bidirectional) | Zelda bidirectional I2V finetuning from `FastVideo/Matrix-Game-2.0-Base-Diffusers`. Uses 33-frame clips and Zelda validation with action overlays. | |
| 20 | +| `zelda/dfsft_causal_i2v.yaml` | `DiffusionForcingSFTMethod` | `MatrixGame2CausalModel` | Zelda causal Diffusion-Forcing SFT from `mignonjia/mg_bidirectional_zelda`. Uses the same Zelda data, resolution, optimizer, and validation defaults as the Zelda finetune config. | |
| 21 | +| `zelda/self_forcing_causal_i2v.yaml` | `SelfForcingMethod` | `MatrixGame2CausalModel` | Zelda DMD/Self-Forcing distillation; student init = `mignonjia/mg_causal_zelda`, teacher = bidirectional (`mignonjia/mg_bidirectional_zelda`), critic = bidirectional. | |
| 22 | +| `zelda/streaming_long_tuning_causal_i2v.yaml` | `StreamingLongTuningMethod` | `MatrixGame2CausalModel` | LongLive-style streaming long tuning from the 1k-step Zelda self-forcing checkpoint. | |
| 23 | + |
| 24 | +Zelda world-model distillation is a two-run workflow: first run |
| 25 | +`zelda/self_forcing_causal_i2v.yaml` to train or load the 1k-step |
| 26 | +self-forcing checkpoint (`mignonjia/mg_sf_distilled_zelda_1k_steps`), then run |
| 27 | +`zelda/streaming_long_tuning_causal_i2v.yaml` for the 3k-step streaming |
| 28 | +long-tuning stage. The long-tuning YAML starts from that 1k-step checkpoint; it |
| 29 | +does not run the short self-forcing stage inside the same config. |
| 30 | + |
| 31 | +## Zelda Training Data |
| 32 | + |
| 33 | +The Zelda training configs use `data/zeldam2-clean` as a suggested local path. |
| 34 | +Download the dataset from Hugging Face before running those configs: |
| 35 | + |
| 36 | +```bash |
| 37 | +python scripts/huggingface/download_hf.py \ |
| 38 | + --repo_id mignonjia/zeldam2-clean \ |
| 39 | + --local_dir data/zeldam2-clean \ |
| 40 | + --repo_type dataset |
| 41 | +``` |
| 42 | + |
| 43 | +You can store the dataset elsewhere; update `training.data.data_path` in the |
| 44 | +YAML to point at that location. |
| 45 | + |
| 46 | +## Multi3D Training Data |
| 47 | + |
| 48 | +`zelda/finetune_i2v.yaml` includes an optional, commented-out Multi3D entry. |
| 49 | +Enable it only when you want to mix Zelda with multi-game data from |
| 50 | +`data/multi3d_games`. You can store this dataset anywhere; before enabling it, |
| 51 | +update the matching commented `training.data.data_path` key in the YAML to the |
| 52 | +correct location. |
| 53 | + |
| 54 | +To mix datasets in a training YAML, set `training.data.data_path` to a |
| 55 | +path-to-repeat-count mapping. For example, `zelda/finetune_i2v.yaml` can use |
| 56 | +`data/zeldam2-clean: 1` and `# data/multi3d_games: 10`; uncommenting the |
| 57 | +Multi3D entry repeats the multi-game parquet list ten times before training |
| 58 | +samples are shuffled. |
| 59 | + |
| 60 | +## World Model Validation Data |
| 61 | + |
| 62 | +The Zelda validation configs expect a small public validation bundle under |
| 63 | +`data/zelda_validation_data`. |
| 64 | + |
| 65 | +Download it from Hugging Face before running the Zelda scenarios: |
| 66 | + |
| 67 | +```bash |
| 68 | +python scripts/huggingface/download_hf.py \ |
| 69 | + --repo_id mignonjia/zelda_validation_data \ |
| 70 | + --local_dir data/zelda_validation_data \ |
| 71 | + --repo_type dataset |
| 72 | +``` |
| 73 | + |
| 74 | +The bundle contains `validation_zelda.json`, `images/`, and `actions/`. |
| 75 | +The Zelda configs point |
| 76 | +`callbacks.validation.dataset_file` at |
| 77 | +`data/zelda_validation_data/validation_zelda.json`. |
11 | 78 |
|
12 | 79 | ## Usage |
13 | 80 |
|
| 81 | +### Solaris |
| 82 | + |
14 | 83 | ```bash |
15 | 84 | bash examples/train/run.sh \ |
16 | | - examples/train/scenario/worldmodel/finetune_i2v.yaml |
| 85 | + examples/train/scenario/worldmodel/solaris/finetune_i2v.yaml |
| 86 | + |
| 87 | +bash examples/train/run.sh \ |
| 88 | + examples/train/scenario/worldmodel/solaris/dfsft_causal_i2v.yaml |
| 89 | + |
| 90 | +bash examples/train/run.sh \ |
| 91 | + examples/train/scenario/worldmodel/solaris/self_forcing_causal_i2v.yaml |
| 92 | +``` |
| 93 | + |
| 94 | +### Zelda |
| 95 | + |
| 96 | +```bash |
| 97 | +# Finetuning / DFSFT |
| 98 | +bash examples/train/run.sh \ |
| 99 | + examples/train/scenario/worldmodel/zelda/finetune_i2v.yaml |
| 100 | + |
| 101 | +bash examples/train/run.sh \ |
| 102 | + examples/train/scenario/worldmodel/zelda/dfsft_causal_i2v.yaml |
17 | 103 |
|
| 104 | +# Distillation / long tuning |
18 | 105 | bash examples/train/run.sh \ |
19 | | - examples/train/scenario/worldmodel/dfsft_causal_i2v.yaml |
| 106 | + examples/train/scenario/worldmodel/zelda/self_forcing_causal_i2v.yaml |
20 | 107 |
|
21 | 108 | bash examples/train/run.sh \ |
22 | | - examples/train/scenario/worldmodel/self_forcing_causal_i2v.yaml |
| 109 | + examples/train/scenario/worldmodel/zelda/streaming_long_tuning_causal_i2v.yaml |
23 | 110 | ``` |
24 | 111 |
|
25 | 112 | Override any field on the command line: |
26 | 113 |
|
27 | 114 | ```bash |
28 | 115 | bash examples/train/run.sh \ |
29 | | - examples/train/scenario/worldmodel/dfsft_causal_i2v.yaml \ |
| 116 | + examples/train/scenario/worldmodel/solaris/dfsft_causal_i2v.yaml \ |
30 | 117 | --training.distributed.num_gpus 8 \ |
31 | 118 | --training.optimizer.learning_rate 1e-5 |
32 | 119 | ``` |
0 commit comments