ElysiaTrue commited on
Commit
d2c4b7e
·
verified ·
1 Parent(s): 7311e2f

Simplify StreamWAM model card

Browse files
Files changed (1) hide show
  1. README.md +60 -106
README.md CHANGED
@@ -10,16 +10,26 @@ tags:
10
  - pytorch
11
  ---
12
 
13
- # StreamWAM
 
 
14
 
15
- StreamWAM provides synchronous and asynchronous world-action inference for robot manipulation. This repository contains two LIBERO checkpoints in their original FastWAM checkpoint format. StreamWAM loads them directly at runtime; no offline checkpoint conversion or duplicate model copy is required.
 
 
16
 
17
- ## Models
18
 
19
- | Directory | Inference mode | Description |
 
 
 
 
 
 
20
  | --- | --- | --- |
21
- | `joint-cd/` | Joint CD | Direct synchronous one-step consistency inference that jointly predicts world and action tokens. |
22
- | `ac-stream/` | AC-Stream | D0/D8 asynchronous inference that overlaps model prediction with action execution. The same checkpoint supports eager and accelerated backends. |
23
 
24
  Each directory contains:
25
 
@@ -28,56 +38,45 @@ model.pt
28
  dataset_stats.json
29
  ```
30
 
31
- The checkpoints use a Wan2.2 TI2V 5B backbone. The Wan2.2 model assets are not included in this repository and must be obtained separately.
32
 
33
- ## Inference geometry
34
 
35
- Both checkpoints target the following LIBERO setup:
36
 
37
- - two RGB cameras, concatenated horizontally;
38
- - per-camera resolution: 224 x 224;
39
- - model image input: 224 x 448;
40
- - action dimension: 7;
41
- - proprioception dimension: 8;
42
- - action horizon: 32;
43
- - video context: 9 frames at inference time;
44
- - BF16 model execution.
45
 
46
- Joint CD uses one consistency step and replans every 16 executed actions.
47
 
48
- AC-Stream uses the H32/s16/d8 schedule:
49
 
50
- - D0 starts without a clean action prefix;
51
- - D8 conditions on the first 8 clean actions of the current horizon;
52
- - background D8 inference is launched while actions are executing;
53
- - the controller advances by a stride of 16 actions;
54
- - deadline misses block at the boundary instead of installing a stale prediction.
55
 
56
- ## Requirements
 
 
57
 
58
- Inference requires:
59
 
60
- 1. the StreamWAM source code;
61
- 2. Wan2.2 TI2V 5B model assets;
62
- 3. a LIBERO source checkout and simulator dependencies;
63
- 4. the checkpoint and matching `dataset_stats.json` from this repository.
64
 
65
- The accelerated AC-Stream backend was validated with:
 
 
66
 
67
- ```text
68
- Python 3.10.20
69
- PyTorch 2.7.1+cu128
70
- Triton 3.3.1
71
- CUDA 12.8 runtime
72
- NVIDIA H100 80GB HBM3
73
- BF16
74
  ```
75
 
76
- It uses static full-graph `torch.compile`, Inductor CUDA Graph Trees, prompt cross-attention K/V caching, attention-mask and schedule caching, and D0/D8 prewarming. Compilation or prewarming failure is reported instead of silently falling back to eager execution.
77
-
78
- ## Download
79
 
80
- Install the Hugging Face CLI, authenticate if required, and download the repository:
81
 
82
  ```bash
83
  hf download SJTU-DENG-Lab/StreamWAM \
@@ -96,18 +95,24 @@ checkpoints/streamwam/
96
  └── dataset_stats.json
97
  ```
98
 
99
- ## LIBERO evaluation
100
 
101
- Set the external asset paths first:
102
 
103
  ```bash
104
- export BACKBONE_PATH=/path/to/Wan2.2-TI2V-5B
105
- export LIBERO_HOME_PATH=/path/to/LIBERO
 
 
 
 
 
 
106
  ```
107
 
108
- ### Joint CD
109
 
110
- The following evaluates all 40 LIBERO tasks once with four persistent workers:
111
 
112
  ```bash
113
  python examples/libero/multigpu_rollout.py \
@@ -117,9 +122,9 @@ python examples/libero/multigpu_rollout.py \
117
  --config examples/libero/configs/recipes/streamwam_libero_joint_cd_wan22_5b.yaml \
118
  --checkpoint-format fastwam \
119
  --checkpoint checkpoints/streamwam/joint-cd/model.pt \
120
- --backbone-path "$BACKBONE_PATH" \
121
  --stats-path checkpoints/streamwam/joint-cd/dataset_stats.json \
122
- --libero-home "$LIBERO_HOME_PATH" \
123
  --num-steps-wait 30 \
124
  --replan-steps 16 \
125
  --num-inference-steps 1 \
@@ -129,64 +134,13 @@ python examples/libero/multigpu_rollout.py \
129
  --save-video
130
  ```
131
 
132
- ### AC-Stream eager
133
-
134
- ```bash
135
- python examples/libero/multigpu_rollout.py \
136
- --gpus 0,1,2,3 \
137
- --suites libero_spatial,libero_object,libero_goal,libero_10 \
138
- --num-trials 1 \
139
- --config examples/libero/configs/recipes/streamwam_libero_ac_stream_wan22_5b.yaml \
140
- --checkpoint-format fastwam \
141
- --checkpoint checkpoints/streamwam/ac-stream/model.pt \
142
- --backbone-path "$BACKBONE_PATH" \
143
- --stats-path checkpoints/streamwam/ac-stream/dataset_stats.json \
144
- --libero-home "$LIBERO_HOME_PATH" \
145
- --num-steps-wait 30 \
146
- --replan-steps 16 \
147
- --num-inference-steps 1 \
148
- --sampling-method ac-stream \
149
- --fixed-seed \
150
- --mujoco-gl egl \
151
- --save-video
152
- ```
153
-
154
- ### AC-Stream accelerated
155
-
156
- Use the same checkpoint and append `--ac-stream-accelerated`:
157
-
158
- ```bash
159
- python examples/libero/multigpu_rollout.py \
160
- --gpus 0,1,2,3 \
161
- --suites libero_spatial,libero_object,libero_goal,libero_10 \
162
- --num-trials 1 \
163
- --config examples/libero/configs/recipes/streamwam_libero_ac_stream_wan22_5b.yaml \
164
- --checkpoint-format fastwam \
165
- --checkpoint checkpoints/streamwam/ac-stream/model.pt \
166
- --backbone-path "$BACKBONE_PATH" \
167
- --stats-path checkpoints/streamwam/ac-stream/dataset_stats.json \
168
- --libero-home "$LIBERO_HOME_PATH" \
169
- --num-steps-wait 30 \
170
- --replan-steps 16 \
171
- --num-inference-steps 1 \
172
- --sampling-method ac-stream \
173
- --ac-stream-accelerated \
174
- --fixed-seed \
175
- --mujoco-gl egl \
176
- --save-video
177
- ```
178
-
179
- For the validated accelerated runtime, the final report should show one Dynamo graph, zero recompiles, zero Inductor CUDA Graph skips, and successful D0/D8 prewarming. Raw inference averages include startup effects; use the reported steady-state D8 latency for backend comparisons.
180
 
181
- ## Checkpoint loading
182
 
183
- Use `--checkpoint-format fastwam` for both models. StreamWAM validates the video expert, action expert, and proprioception encoder key sets and tensor shapes before copying weights. A partial or incompatible checkpoint fails before mutating the model.
184
 
185
- The matching statistics file is required for LIBERO state normalization and action denormalization. Do not mix statistics between `joint-cd` and `ac-stream`.
186
 
187
- ## Scope and limitations
188
 
189
- - These checkpoints are provided for LIBERO evaluation.
190
- - Wan2.2 backbone assets and LIBERO are external dependencies and are not redistributed here.
191
- - AC-Stream accelerated performance depends on GPU architecture, PyTorch/Triton versions, compilation cache state, and simulator workload.
192
- - The accelerated backend changes execution strategy but uses the same AC-Stream checkpoint and inference semantics.
 
10
  - pytorch
11
  ---
12
 
13
+ <div align="center">
14
+ <h1>StreamWAM</h1>
15
+ <h3>Streaming World-Action Models for Robotic Manipulation</h3>
16
 
17
+ <a href="https://github.com/SJTU-DENG-Lab/StreamWAM"><img src="https://img.shields.io/badge/GitHub-Code-111827?logo=github" alt="GitHub Code"></a>
18
+ <a href="https://github.com/SJTU-DENG-Lab/StreamWAM/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-6B5BFF" alt="Apache 2.0 License"></a>
19
+ </div>
20
 
21
+ StreamWAM is a research framework for streaming World-Action Models. It provides a unified testbed for studying and comparing efficient robot-control strategies.
22
 
23
+ StreamWAM uses the actions currently being executed by the robot to guide its next prediction. This allows action execution and model inference to proceed together, reducing the time required to complete a robot task while maintaining strong control performance.
24
+
25
+ This repository provides the released LIBERO checkpoints. The corresponding inference and evaluation code is available in the [StreamWAM GitHub repository](https://github.com/SJTU-DENG-Lab/StreamWAM).
26
+
27
+ ## Released checkpoints
28
+
29
+ | Directory | Model | Description |
30
  | --- | --- | --- |
31
+ | `joint-cd/` | FastWAM-Joint-CD | Fast one-step joint world-and-action prediction for LIBERO. |
32
+ | `ac-stream/` | StreamWAM | Recommended StreamWAM checkpoint for efficient LIBERO evaluation. |
33
 
34
  Each directory contains:
35
 
 
38
  dataset_stats.json
39
  ```
40
 
41
+ The checkpoints use the Wan2.2 TI2V 5B backbone. Wan2.2 model assets are not included here and must be downloaded separately.
42
 
43
+ ## LIBERO results
44
 
45
+ We evaluate all methods on LIBERO-10, LIBERO-Spatial, LIBERO-Goal, and LIBERO-Object with 50 trials per task. `Chunk Time` is the average model inference time for one action chunk. `Episode Time` is the average end-to-end task duration for long- and short-horizon tasks.
46
 
47
+ | Method | LIBERO-10 | Spatial | Goal | Object | Average (%) ↑ | Chunk Time (ms) ↓ | Episode Time (s) ↓ Long / Short |
48
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
49
+ | FastWAM | 96.20 | 96.20 | 94.20 | 96.20 | 95.70 | 493.0 | 16.31 / 8.25 |
50
+ | FastWAM-Joint-CD | 97.20 | 99.60 | 98.60 | 100.00 | 98.85 | 114.2 | 6.89 / 3.74 |
51
+ | **StreamWAM** | **96.60** | **98.80** | **97.40** | **100.00** | **98.20** | **41.0** | **5.36 / 3.15** |
 
 
 
52
 
53
+ ## Installation
54
 
55
+ Clone the code repository and install the environment:
56
 
57
+ ```bash
58
+ git clone https://github.com/SJTU-DENG-Lab/StreamWAM.git
59
+ cd StreamWAM
 
 
60
 
61
+ python -m pip install -U uv
62
+ uv sync
63
+ ```
64
 
65
+ The reference environment uses Python 3.10, PyTorch 2.7.1 with CUDA 12.8, and Triton 3.3.1.
66
 
67
+ Prepare LIBERO and the Wan2.2 backbone:
 
 
 
68
 
69
+ ```bash
70
+ git clone https://github.com/Lifelong-Robot-Learning/LIBERO.git third_party/LIBERO
71
+ uv pip install -e third_party/LIBERO --no-deps
72
 
73
+ uv run huggingface-cli download Wan-AI/Wan2.2-TI2V-5B \
74
+ --local-dir checkpoints/Wan2.2-TI2V-5B
 
 
 
 
 
75
  ```
76
 
77
+ ## Download checkpoints
 
 
78
 
79
+ Download both released checkpoints:
80
 
81
  ```bash
82
  hf download SJTU-DENG-Lab/StreamWAM \
 
95
  └── dataset_stats.json
96
  ```
97
 
98
+ ## Run StreamWAM
99
 
100
+ Evaluate all 40 LIBERO tasks once on four GPUs:
101
 
102
  ```bash
103
+ PYTHON_BIN=.venv/bin/python \
104
+ GPU_IDS=0,1,2,3 \
105
+ BACKBONE_PATH="$PWD/checkpoints/Wan2.2-TI2V-5B" \
106
+ LIBERO_HOME_PATH="$PWD/third_party/LIBERO" \
107
+ CHECKPOINT_PATH="$PWD/checkpoints/streamwam/ac-stream/model.pt" \
108
+ STATS_PATH="$PWD/checkpoints/streamwam/ac-stream/dataset_stats.json" \
109
+ bash examples/libero/scripts/launch_streamwam_libero_ac_stream_4gpu.sh \
110
+ --ac-stream-accelerated
111
  ```
112
 
113
+ The launcher evaluates one trial for every task in `libero_spatial`, `libero_object`, `libero_goal`, and `libero_10`. GPU IDs can be changed through `GPU_IDS`.
114
 
115
+ ## Run FastWAM-Joint-CD
116
 
117
  ```bash
118
  python examples/libero/multigpu_rollout.py \
 
122
  --config examples/libero/configs/recipes/streamwam_libero_joint_cd_wan22_5b.yaml \
123
  --checkpoint-format fastwam \
124
  --checkpoint checkpoints/streamwam/joint-cd/model.pt \
125
+ --backbone-path checkpoints/Wan2.2-TI2V-5B \
126
  --stats-path checkpoints/streamwam/joint-cd/dataset_stats.json \
127
+ --libero-home third_party/LIBERO \
128
  --num-steps-wait 30 \
129
  --replan-steps 16 \
130
  --num-inference-steps 1 \
 
134
  --save-video
135
  ```
136
 
137
+ For more evaluation options, see the [LIBERO guide](https://github.com/SJTU-DENG-Lab/StreamWAM/blob/main/examples/libero/LIBERO.md).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
+ ## License
140
 
141
+ Released under the [Apache License 2.0](https://github.com/SJTU-DENG-Lab/StreamWAM/blob/main/LICENSE).
142
 
143
+ ## Acknowledgements
144
 
145
+ StreamWAM builds on ideas and open-source work from [FastWAM](https://github.com/yuantianyuan01/FastWAM), [StarWAM](https://github.com/shaohua-pan/StarWAM), [LIBERO](https://github.com/Lifelong-Robot-Learning/LIBERO), and [Wan2.2](https://github.com/Wan-Video/Wan2.2).
146