examples: duel_bull_character and world_edit_stairs (real-time DMD cases)
Browse files- .gitattributes +2 -0
- code/README.md +9 -7
- examples/README.md +17 -6
- examples/duel_bull_character/cond.mp4 +3 -0
- examples/duel_bull_character/first_frame.png +3 -0
- examples/duel_bull_character/gbuf.npz +3 -0
- examples/duel_bull_character/output.mp4 +3 -0
- examples/duel_bull_character/prompt.txt +4 -0
- examples/duel_bull_character/proxy.mkv +3 -0
- examples/duel_bull_character/ref_a.png +3 -0
- examples/duel_bull_character/slots.npz +3 -0
- examples/duel_bull_character/tier.npy +3 -0
- examples/world_edit_stairs/cond.mp4 +3 -0
- examples/world_edit_stairs/first_frame.png +3 -0
- examples/world_edit_stairs/gbuf.npz +3 -0
- examples/world_edit_stairs/output.mp4 +3 -0
- examples/world_edit_stairs/prompt.txt +3 -0
- examples/world_edit_stairs/proxy.mkv +3 -0
- examples/world_edit_stairs/slots.npz +3 -0
- examples/world_edit_stairs/tier.npy +3 -0
.gitattributes
CHANGED
|
@@ -65,3 +65,5 @@ examples/fight_player_attacks_character/cond_v7.mkv filter=lfs diff=lfs merge=lf
|
|
| 65 |
examples/entry_two_characters/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
| 66 |
examples/fight_character_strikes_player/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
| 67 |
examples/fight_player_attacks_character/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 65 |
examples/entry_two_characters/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
| 66 |
examples/fight_character_strikes_player/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
| 67 |
examples/fight_player_attacks_character/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
examples/duel_bull_character/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
examples/world_edit_stairs/proxy.mkv filter=lfs diff=lfs merge=lfs -text
|
code/README.md
CHANGED
|
@@ -87,14 +87,16 @@ export WAN_CKPT=$PWD/checkpoints/Wan2.2-TI2V-5B # the VAE, T5 and tokenizer
|
|
| 87 |
## Quick start
|
| 88 |
|
| 89 |
```bash
|
| 90 |
-
# the real-time model and
|
| 91 |
huggingface-cli download yuzhewu207/wizard --repo-type dataset \
|
| 92 |
-
--include "weights/causal_dmd/
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
# real-time 2-step causal student
|
| 96 |
-
|
| 97 |
-
|
|
|
|
|
|
|
| 98 |
|
| 99 |
# the same with an online-maintained 3D world (the case needs world_px.npz); FAST=1 runs the maintenance on the second GPU
|
| 100 |
CUDA_VISIBLE_DEVICES=0,1 FAST=1 bash scripts/infer/run_case.sh world <dit> <case> out.mp4
|
|
|
|
| 87 |
## Quick start
|
| 88 |
|
| 89 |
```bash
|
| 90 |
+
# the real-time model and five ready-made cases (first frame, proxy video, reference images, our outputs)
|
| 91 |
huggingface-cli download yuzhewu207/wizard --repo-type dataset \
|
| 92 |
+
--include "weights/causal_dmd/ema_step300.safetensors" "examples/*" --local-dir hf_wizard
|
| 93 |
+
W=hf_wizard/weights/causal_dmd/ema_step300.safetensors
|
| 94 |
+
|
| 95 |
+
# real-time 2-step causal student: an 8 s duel with a character already in the first frame, and an 8 s world edit
|
| 96 |
+
C=hf_wizard/examples/duel_bull_character
|
| 97 |
+
bash scripts/infer/run_case.sh causal $W $C out.mp4 --ref1 $C/ref_a.png --ref-slots 2,0
|
| 98 |
+
C=hf_wizard/examples/world_edit_stairs
|
| 99 |
+
bash scripts/infer/run_case.sh causal $W $C out.mp4 --ref-slots 0,0
|
| 100 |
|
| 101 |
# the same with an online-maintained 3D world (the case needs world_px.npz); FAST=1 runs the maintenance on the second GPU
|
| 102 |
CUDA_VISIBLE_DEVICES=0,1 FAST=1 bash scripts/infer/run_case.sh world <dit> <case> out.mp4
|
examples/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Example cases
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
| file | content |
|
| 6 |
|---|---|
|
|
@@ -9,17 +9,19 @@ Three ready-to-run cases with our outputs. Each folder is a *case* as the infere
|
|
| 9 |
| `cond.mp4` | the same proxy in the earlier colour coding; only the character layer is read from it |
|
| 10 |
| `tier.npy`, `gbuf.npz` | geometry tier per cell; depth and cameras |
|
| 11 |
| `slots.npz` | image region of each character per frame |
|
| 12 |
-
| `ref_a.png`, `ref_b.png` | reference images of the
|
| 13 |
| `prompt.txt` | text prompt (Chinese, as in training) |
|
| 14 |
-
| `output.mp4` | **our result**
|
| 15 |
|
| 16 |
| case | what happens | weights to run it with |
|
| 17 |
|---|---|---|
|
| 18 |
| `fight_character_strikes_player/` | two characters enter from the sides; at 1.6 s character 1 (purple panther) strikes the player, who is knocked down and stays down | `weights/bidirectional/dit_step35000.safetensors` |
|
| 19 |
| `fight_player_attacks_character/` | two characters enter; at 1.6 s the player attacks character 2 (clockwork titan), which flinches from the hit | `weights/bidirectional/dit_step35000.safetensors` |
|
| 20 |
| `entry_two_characters/` | two characters with the *same skeleton* and different reference images enter one after the other; only the references tell them apart | `weights/bidirectional/dit_step35000.safetensors` |
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
Run one with the code from [
|
| 23 |
|
| 24 |
```bash
|
| 25 |
C=examples/fight_character_strikes_player
|
|
@@ -27,6 +29,15 @@ FRAMES=121 bash scripts/infer/run_case.sh bidirectional weights/bidirectional/di
|
|
| 27 |
--ref1 $C/ref_a.png --ref2 $C/ref_b.png --ref-slots 2,3 --seed 0
|
| 28 |
```
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Example cases
|
| 2 |
|
| 3 |
+
Five ready-to-run cases with our outputs. Each folder is a *case* as the inference code expects it:
|
| 4 |
|
| 5 |
| file | content |
|
| 6 |
|---|---|
|
|
|
|
| 9 |
| `cond.mp4` | the same proxy in the earlier colour coding; only the character layer is read from it |
|
| 10 |
| `tier.npy`, `gbuf.npz` | geometry tier per cell; depth and cameras |
|
| 11 |
| `slots.npz` | image region of each character per frame |
|
| 12 |
+
| `ref_a.png`, `ref_b.png` | reference images of the characters (slots 2 and 3 in the entry / fight cases; slot 2 = the bull in `duel_bull_character`) |
|
| 13 |
| `prompt.txt` | text prompt (Chinese, as in training) |
|
| 14 |
+
| `output.mp4` | **our result**: the three entry / fight cases with the bidirectional model (30 steps, guidance 3, seed 0; the two fight cases were made with an earlier bidirectional model, so a rerun with `weights/bidirectional` looks close but not identical); the two real-time cases with `weights/causal_dmd` (2 steps, streaming) |
|
| 15 |
|
| 16 |
| case | what happens | weights to run it with |
|
| 17 |
|---|---|---|
|
| 18 |
| `fight_character_strikes_player/` | two characters enter from the sides; at 1.6 s character 1 (purple panther) strikes the player, who is knocked down and stays down | `weights/bidirectional/dit_step35000.safetensors` |
|
| 19 |
| `fight_player_attacks_character/` | two characters enter; at 1.6 s the player attacks character 2 (clockwork titan), which flinches from the hit | `weights/bidirectional/dit_step35000.safetensors` |
|
| 20 |
| `entry_two_characters/` | two characters with the *same skeleton* and different reference images enter one after the other; only the references tell them apart | `weights/bidirectional/dit_step35000.safetensors` |
|
| 21 |
+
| `duel_bull_character/` | 8 s duel with a character that is already in the first frame (a golden bull); the player is knocked down and gets up, the bull keeps its identity through the reference image | `weights/causal_dmd/ema_step300.safetensors` (real time) |
|
| 22 |
+
| `world_edit_stairs/` | 8 s world edit: the player walks through a pine forest and stone steps rise out of the ground one by one in the proxy; the player climbs them | `weights/causal_dmd/ema_step300.safetensors` (real time) |
|
| 23 |
|
| 24 |
+
Run one with the code from [YeyingLab/Wizard](https://github.com/YeyingLab/Wizard) (setup in its README):
|
| 25 |
|
| 26 |
```bash
|
| 27 |
C=examples/fight_character_strikes_player
|
|
|
|
| 29 |
--ref1 $C/ref_a.png --ref2 $C/ref_b.png --ref-slots 2,3 --seed 0
|
| 30 |
```
|
| 31 |
|
| 32 |
+
The two real-time cases (241 frames):
|
| 33 |
|
| 34 |
+
```bash
|
| 35 |
+
C=examples/duel_bull_character
|
| 36 |
+
bash scripts/infer/run_case.sh causal weights/causal_dmd/ema_step300.safetensors $C out.mp4 --ref1 $C/ref_a.png --ref-slots 2,0
|
| 37 |
+
C=examples/world_edit_stairs
|
| 38 |
+
bash scripts/infer/run_case.sh causal weights/causal_dmd/ema_step300.safetensors $C out.mp4 --ref-slots 0,0
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
This writes `out.mp4` (result next to the proxy) and `out_gen.mp4` (result only); `out_gen.mp4` should match `output.mp4`. A bidirectional case takes about 4 minutes on one H200; a real-time case about 2 minutes including model loading.
|
| 42 |
+
|
| 43 |
+
The first frames of the three entry / fight cases come from the WBench benchmark and their reference images were generated with Qwen-Image; the first frames and the reference image of the two real-time cases were generated by us.
|
examples/duel_bull_character/cond.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea7674aa2b1a7c1d23e49af255378b5b123b555e50deb1b5cd4093ea210e14ed
|
| 3 |
+
size 2750233
|
examples/duel_bull_character/first_frame.png
ADDED
|
Git LFS Details
|
examples/duel_bull_character/gbuf.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b39c11ac6911f400d6797e173eba254418215b184012a85ba71a36cfa8563d04
|
| 3 |
+
size 16333250
|
examples/duel_bull_character/output.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3858e7fa36c91fa10fe9041ceeeae1fb84ddf9131d7968589d4468cb84ddccb
|
| 3 |
+
size 6924809
|
examples/duel_bull_character/prompt.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
几何条件画面:粉紫色是场景粗几何(颜色编码高度与深度),火柴人与棍状线条是玩家和 BOSS 的骨架与武器,线条的绿色深浅表示角色朝向(越亮越朝向镜头,越暗越背对镜头),完整呈现两名角色的动作、朝向、武器轨迹与相对远近。
|
| 2 |
+
玩家角色外观:年轻女性剑士,黑色长发束成高马尾,身穿绿色短上衣和深色长裤,右手持一把细长的剑。
|
| 3 |
+
BOSS 外观:一只黄色毛绒公牛怪,浑身覆盖蓬松的金黄色长毛,头顶一对弯角,脸像人,身材圆滚滚,直立行走。
|
| 4 |
+
背景描述:黄昏时分的中式山谷平台,远处是层叠的石峰与云海,地面是石板,两侧有石灯笼,夕阳在右上方。
|
examples/duel_bull_character/proxy.mkv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b96a70ee516631a256fe91727c8ccbde2955023856ea315a1ef49df5bec30a67
|
| 3 |
+
size 21771314
|
examples/duel_bull_character/ref_a.png
ADDED
|
Git LFS Details
|
examples/duel_bull_character/slots.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0df8cf5c4abe316abeea09aa7453a36ff77f7cf840fd9516c7d9d084de5636b9
|
| 3 |
+
size 118416
|
examples/duel_bull_character/tier.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4f1a43ad38834d3324c476b7c7cea3cd470e1d16f8109d37789f282e78f1c0b
|
| 3 |
+
size 1503968
|
examples/world_edit_stairs/cond.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e45e4cb2ed3a557e2c5e5753c856bef7f8995494df41ff3bcf9f9a4dc586dbf9
|
| 3 |
+
size 2986793
|
examples/world_edit_stairs/first_frame.png
ADDED
|
Git LFS Details
|
examples/world_edit_stairs/gbuf.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:044a70ed9a86ea491ed610f373d7dade25238c2c3997b077ff90be3dceb3c5bc
|
| 3 |
+
size 17807157
|
examples/world_edit_stairs/output.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61faf8c55e28b448358347ae44643a5925092f748f1a2ee4fdb95fa0016f3387
|
| 3 |
+
size 6011585
|
examples/world_edit_stairs/prompt.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
几何条件画面:粉紫色是场景粗几何(颜色编码高度与深度),火柴人与棍状线条是玩家的骨架与武器,线条的绿色深浅表示角色朝向(越亮越朝向镜头,越暗越背对镜头),完整呈现玩家的动作、朝向与武器轨迹。玩家的外观与参考图完全一致;画面中没有 BOSS。
|
| 2 |
+
玩家角色外观:玩家角色为中等体型,白发,身着深色长袍配金色镶边与腰带,脚穿靴子,手持一根顶端有装饰的法杖,背对镜头。
|
| 3 |
+
背景描述:画面背景为一片幽深的针叶林,地面覆盖着落叶与苔藓,高耸的树木林立,远处林间弥漫着薄雾,天空透出柔和的晨光,阳光透过树冠洒下斑驳的光影。巫师在松林中前行,举杖,一级级石阶从林地里拔起,他拾级而上。
|
examples/world_edit_stairs/proxy.mkv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ef4a7eee797cd2dc63b5bb7517a923d3224aecc03d98f12368c58c2bf06d08f
|
| 3 |
+
size 59726548
|
examples/world_edit_stairs/slots.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a8255dea704aee4afa755d82dd63c6d8a116aceafca2f112787649acf5aa5c7
|
| 3 |
+
size 52522
|
examples/world_edit_stairs/tier.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b04191fb7ac3fc787bf832b88be4b93e5bb14a8cbe002805c4ae7b12b7172d44
|
| 3 |
+
size 1503968
|