yuzhewu207 commited on
Commit
3d6596c
·
verified ·
1 Parent(s): be18742

code/: stage 1 in one run with world-edit clips

Browse files
code/docs/TRAINING.md CHANGED
@@ -17,15 +17,14 @@ bash scripts/train/3_consistency.sh runs/causal/dits/dit_step11000.safetensors r
17
  bash scripts/train/4_dmd.sh runs/cd/ema/ema_step10000.safetensors runs/bidir/dits/dit_step35000.safetensors runs/dmd # 500
18
  ```
19
 
20
- Our runs were interrupted and resumed (the scripts' comments say how): stage 1 phase 2 restarted from the 3k checkpoint
21
- when the world-edit clips were added; stage 2 was resumed from its own checkpoints (seed = resume step); stage 3 ran 0 -> 2.7k
22
  and was then warm-started from its 2k EMA (`STUDENT_INIT`, `STEP0=2000`, `SEED=1`) to 10k.
23
 
24
  ## Stages
25
 
26
  | Stage | Steps | Batch | LR | Notes |
27
  |---|---|---|---|---|
28
- | 1. Bidirectional | 3k + 32k | 8 | 1e-5 (condition layers 1e-4) | unknown cells without coordinates, `p_unk2 0.5`, memory loss weight 3; world-edit clips (`WEDIT=1`) from 3k |
29
  | 2. Causal teacher | 11k | 8 | 1e-5 (condition layers 1e-5) | history window 20 + sink 1; history self-augmentation `SA_P 0.5 / SA_MAX 0.25` on revisit clips; memory from before and after the window |
30
  | 3. Consistency distillation | 10k | 8 | 2e-6, EMA 0.99 | N = 48 levels, 2 sampling steps (1000, 500), teacher CFG 3, `SA_P 0.7 / SA_MAX 0.5`; memory before and after the window |
31
  | 4. DMD | 500 | 32 (8 × accum 4) | 2e-6 / critic 4e-7 | critic : student = 5 : 1, real score = the stage-1 model with CFG 3; memory from the past only, no world-edit clips |
@@ -46,7 +45,7 @@ stage 3 the teacher keeps the clean history and only the student / EMA read the
46
  |---|---|---|
47
  | `UNK_NOCOORD=1` | all | unknown cells carry no world coordinates |
48
  | `MEMW_COVER=1` | all | cells the window's first frame has not seen but a retrieved memory frame has get loss weight `--mem_loss_w`; "seen" by projected coverage |
49
- | `WEDIT=1` | 1 (from 3k), 2, 3 | add the world-edit clips' memory index and banks (`worldedit/`); their rows come with `--extra_rows worldedit/rows_train.jsonl` |
50
  | `MEMW_HISTW`, `MEMW_SINK` | 2 | "seen" also by every clean history frame the noisy frame reads (window + sink), so the weight sits where only memory can tell |
51
  | `MEM_FUTURE=1` | 2 | SceneFly windows may also retrieve frames after the window (stage 3 does the same through `wizard.distill.consistency_selfaug_future`) |
52
  | `SA_P`, `SA_MAX`, `SA_GROUPS` | 2, 3 | history self-augmentation |
 
17
  bash scripts/train/4_dmd.sh runs/cd/ema/ema_step10000.safetensors runs/bidir/dits/dit_step35000.safetensors runs/dmd # 500
18
  ```
19
 
20
+ Our runs were interrupted and resumed (the scripts' comments say how): stage 2 was resumed from its own checkpoints (seed = resume step); stage 3 ran 0 -> 2.7k
 
21
  and was then warm-started from its 2k EMA (`STUDENT_INIT`, `STEP0=2000`, `SEED=1`) to 10k.
22
 
23
  ## Stages
24
 
25
  | Stage | Steps | Batch | LR | Notes |
26
  |---|---|---|---|---|
27
+ | 1. Bidirectional | 35k | 8 | 1e-5 (condition layers 1e-4) | unknown cells without coordinates, `p_unk2 0.5`, memory loss weight 3; world-edit clips (`WEDIT=1`) |
28
  | 2. Causal teacher | 11k | 8 | 1e-5 (condition layers 1e-5) | history window 20 + sink 1; history self-augmentation `SA_P 0.5 / SA_MAX 0.25` on revisit clips; memory from before and after the window |
29
  | 3. Consistency distillation | 10k | 8 | 2e-6, EMA 0.99 | N = 48 levels, 2 sampling steps (1000, 500), teacher CFG 3, `SA_P 0.7 / SA_MAX 0.5`; memory before and after the window |
30
  | 4. DMD | 500 | 32 (8 × accum 4) | 2e-6 / critic 4e-7 | critic : student = 5 : 1, real score = the stage-1 model with CFG 3; memory from the past only, no world-edit clips |
 
45
  |---|---|---|
46
  | `UNK_NOCOORD=1` | all | unknown cells carry no world coordinates |
47
  | `MEMW_COVER=1` | all | cells the window's first frame has not seen but a retrieved memory frame has get loss weight `--mem_loss_w`; "seen" by projected coverage |
48
+ | `WEDIT=1` | 1, 2, 3 | add the world-edit clips' memory index and banks (`worldedit/`); their rows come with `--extra_rows worldedit/rows_train.jsonl` |
49
  | `MEMW_HISTW`, `MEMW_SINK` | 2 | "seen" also by every clean history frame the noisy frame reads (window + sink), so the weight sits where only memory can tell |
50
  | `MEM_FUTURE=1` | 2 | SceneFly windows may also retrieve frames after the window (stage 3 does the same through `wizard.distill.consistency_selfaug_future`) |
51
  | `SA_P`, `SA_MAX`, `SA_GROUPS` | 2, 3 | history self-augmentation |
code/scripts/train/1_bidirectional.sh CHANGED
@@ -1,16 +1,8 @@
1
  #!/bin/bash
2
  # Stage 1: bidirectional teacher, from the official Wan2.2-TI2V-5B weights (released as weights/bidirectional/dit_step35000).
3
- # bash scripts/train/1_bidirectional.sh <out dir> both phases; PHASE=1 or PHASE=2 runs one of them
4
- # Batch 8 (ours: 4 GPUs x --grad_accum 2), lr 1e-5 / condition layers 1e-4, seed 0, the same data mixing from step 0.
5
- # Phase 1 (0 -> 3000) without the world-edit clips; phase 2 (3000 -> 35000) restarts from the 3000 checkpoint with WEDIT=1 and the
6
- # world-edit rows added (the clips became available then; the warm-up restarts with the run).
7
- set -e; source "$(dirname "$0")/common.sh"; OUT=$1
8
- ARGS="--data $D/windows --out $OUT --save_every 1000 --num_workers 6 --grad_accum $GRAD_ACCUM $MIX --mem_loss_w 3 --mem_index mem_index_both.pt \
9
- --p_memunk 0 --p_trueunk 0 --p_unk2 0.5"
10
- if [ "${PHASE:-1}" = 1 ]; then
11
- launch fsdp.yaml wizard.train.bidirectional $ARGS --max_steps 3000 --extra_rows $ROWS
12
- fi
13
- if [ -z "$PHASE" ] || [ "$PHASE" = 2 ]; then
14
- WEDIT=1 launch fsdp.yaml wizard.train.bidirectional $ARGS --init $OUT/dits/dit_step3000.safetensors --step0 3000 --max_steps 35000 \
15
- --extra_rows $ROWS,$WEDIT_ROWS
16
- fi
 
1
  #!/bin/bash
2
  # Stage 1: bidirectional teacher, from the official Wan2.2-TI2V-5B weights (released as weights/bidirectional/dit_step35000).
3
+ # bash scripts/train/1_bidirectional.sh <out dir> [max steps]
4
+ # Batch 8 (GRAD_ACCUM x NGPU), lr 1e-5 / condition layers 1e-4, seed 0, 35k steps, all data including the world-edit clips (WEDIT=1) from step 0.
5
+ set -e; source "$(dirname "$0")/common.sh"
6
+ WEDIT=1 launch fsdp.yaml wizard.train.bidirectional --data $D/windows --out $1 --max_steps ${2:-35000} --save_every 1000 --num_workers 6 \
7
+ --grad_accum $GRAD_ACCUM $MIX --mem_loss_w 3 --mem_index mem_index_both.pt --p_memunk 0 --p_trueunk 0 --p_unk2 0.5 \
8
+ --extra_rows $ROWS,$WEDIT_ROWS