yuzhewu207 commited on
Commit
e87f461
·
verified ·
1 Parent(s): 7facd34

Code: document cond.mp4, point to examples

Browse files
code/README.md CHANGED
@@ -67,18 +67,20 @@ Tested with Python 3.12, PyTorch 2.11 (CUDA 12.8) on 8 × H200. One 5B checkpoin
67
 
68
  ## Inference
69
 
70
- A *case* is a directory produced by the engine: `first_frame.png`, `cond_v7.mkv` (proxy video), `tier7.npy` (geometry tier per cell), `gbuf.npz` (depth and cameras), `slots.npz` (character regions), `prompt.txt`.
71
 
72
  ```bash
73
  # bidirectional model: 30 steps, guidance 3
 
74
  INF_UNK_NOCOORD=1 python -m wizard.inference.bidirectional \
75
- --dit ../weights/bidirectional/dit_step35000.safetensors --case <case dir> --frames 121 \
76
- --ref1 ref_a.png --ref2 ref_b.png --ref-slots 2,3 --out out.mp4
77
 
78
  # causal 2-step student
79
  INF_UNK_NOCOORD=1 python -m wizard.inference.causal \
80
- --dit ../weights/causal_dmd/ema_step480.safetensors --case <case dir> --frames 121 \
81
- --cm_steps 1000,500 --cfg 1 --window 20 --sink 1 --out out.mp4
 
82
  ```
83
 
84
  `INF_UNK_NOCOORD=1` is required: training gives no coordinate token to unknown cells, and inference does the same only when this is set.
 
67
 
68
  ## Inference
69
 
70
+ A *case* is a directory produced by the engine: `first_frame.png`, `cond_v7.mkv` (proxy video), `cond.mp4` (the same proxy in the earlier colour coding; only the character layer is read from it), `tier7.npy` (geometry tier per cell), `gbuf.npz` (depth and cameras), `slots.npz` (character regions), `prompt.txt`. Four ready-made cases with our outputs are in `../examples`.
71
 
72
  ```bash
73
  # bidirectional model: 30 steps, guidance 3
74
+ C=../examples/fight_character_strikes_player
75
  INF_UNK_NOCOORD=1 python -m wizard.inference.bidirectional \
76
+ --dit ../weights/bidirectional/dit_step35000.safetensors --case $C --frames 121 \
77
+ --ref1 $C/ref_a.png --ref2 $C/ref_b.png --ref-slots 2,3 --out out.mp4
78
 
79
  # causal 2-step student
80
  INF_UNK_NOCOORD=1 python -m wizard.inference.causal \
81
+ --dit ../weights/causal_dmd/ema_step480.safetensors --case $C --frames 121 \
82
+ --ref1 $C/ref_a.png --ref2 $C/ref_b.png --ref-slots 2,3 \
83
+ --cm_steps 1000,500 --cfg 1 --window 20 --sink 1 --out out_causal.mp4
84
  ```
85
 
86
  `INF_UNK_NOCOORD=1` is required: training gives no coordinate token to unknown cells, and inference does the same only when this is set.
code/wizard/inference/bidirectional.py CHANGED
@@ -1,7 +1,8 @@
1
  """Sampling with the bidirectional model from a case directory, in chained 121-frame windows.
2
 
3
- A case directory holds ``first_frame.png``, ``cond_v7.mkv`` (proxy video), ``tier7.npy`` (geometry tier per cell), ``gbuf.npz``
4
- (depth and cameras), ``slots.npz`` (character regions) and ``prompt.txt``. Window k starts at frame 120 k from the last frame of
 
5
  window k - 1; memory candidates are the frames generated so far.
6
 
7
  INF_UNK_NOCOORD=1 python -m wizard.inference.bidirectional --dit <weights> --case <case dir> --frames 121 \
 
1
  """Sampling with the bidirectional model from a case directory, in chained 121-frame windows.
2
 
3
+ A case directory holds ``first_frame.png``, ``cond_v7.mkv`` (proxy video), ``cond.mp4`` (the same proxy in the earlier colour
4
+ coding; only the character layer is read from it), ``tier7.npy`` (geometry tier per cell), ``gbuf.npz`` (depth and cameras),
5
+ ``slots.npz`` (character regions) and ``prompt.txt``. Window k starts at frame 120 k from the last frame of
6
  window k - 1; memory candidates are the frames generated so far.
7
 
8
  INF_UNK_NOCOORD=1 python -m wizard.inference.bidirectional --dit <weights> --case <case dir> --frames 121 \