baibao132 commited on
Commit
e98c39f
Β·
verified Β·
1 Parent(s): e4be161

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +184 -0
README.md CHANGED
@@ -1,3 +1,187 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+
5
+ # Astronex-World-5B
6
+
7
+ Real-time interactive video world model for autonomous driving and embodied intelligence: a 5B controllable video DiT
8
+ on the Wan2.2-TI2V-5B backbone, with camera, action, event and text control. One model, two inference forms β€” a
9
+ *bidirectional* form with full temporal attention and a *causal* form that streams a rollout block by block with
10
+ cross-block KV caching. 832x480 and 1280x704 at 24 fps.
11
+
12
+ [Project page](https://world.astronex.com.cn/)  | 
13
+ [Code](https://github.com/Astronex-Robotics/Astronex-World)  | 
14
+ [Weights](https://huggingface.co/Astronex-Lab/Astronex-World)
15
+
16
+ ## Gallery
17
+
18
+ Every clip is generated by these weights. Click a frame to play it on the [project page](https://world.astronex.com.cn/).
19
+
20
+ | | | |
21
+ |:---:|:---:|:---:|
22
+ | [![Rain-soaked megacity pursuit](https://world.astronex.com.cn/assets/poster/Astronex_01_720p24.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_01_720p24.mp4) | [![Storm lighthouse at dusk](https://world.astronex.com.cn/assets/poster/Astronex_04_720p24.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_04_720p24.mp4) | [![Portrait in a gentle breeze](https://world.astronex.com.cn/assets/poster/Astronex_08_480p.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_08_480p.mp4) |
23
+ | [![Alpine lake at sunset](https://world.astronex.com.cn/assets/poster/Astronex_09_480p.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_09_480p.mp4) | [![Ocean cliff at golden hour](https://world.astronex.com.cn/assets/poster/Astronex_10_480p.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_10_480p.mp4) | [![Open-world coastal pursuit](https://world.astronex.com.cn/assets/poster/Astronex_11_480p.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_11_480p.mp4) |
24
+ | [![Wormhole approach](https://world.astronex.com.cn/assets/poster/Astronex_12_480p.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_12_480p.mp4) | [![Supermassive black hole](https://world.astronex.com.cn/assets/poster/Astronex_13_480p.jpg)](https://world.astronex.com.cn/assets/videos/Astronex_13_480p.mp4) | [![Coastal highway under action control](https://world.astronex.com.cn/assets/poster/cosmos-coast.jpg)](https://world.astronex.com.cn/assets/videos/cosmos-coast.mp4) |
25
+
26
+ Each frame in the montage below is a separate project output; the full gallery, including 33-second rollouts and
27
+ action-controlled driving, is on the [project page](https://world.astronex.com.cn/).
28
+
29
+ ![Astronex-World sample montage](https://world.astronex.com.cn/assets/img/teaser.jpg)
30
+
31
+ ## The model
32
+
33
+ Given text or a first frame, the model consumes frame-aligned camera trajectories, a 64-dimensional continuous action
34
+ stream and an embodiment identifier to predict future visual states under control. Cameras are injected with PRoPE in
35
+ all 30 Transformer layers; actions modulate every layer. Beyond steering a rollout, the framework exposes an open
36
+ action-sequence output head β€” see [Action-sequence output](#action-sequence-output-open-post-training-head).
37
+
38
+ | | Value |
39
+ | --- | --- |
40
+ | Parameters | 5.35B |
41
+ | Backbone | Wan2.2-TI2V-5B, 30 layers, hidden 3072, 24 heads, FFN 14,336 |
42
+ | Latent | 48 channels, VAE 4x temporal, 16x16 spatial |
43
+ | Conditioning | text, first frame, camera intrinsics/extrinsics (PRoPE), 64-D continuous action + 32 embodiment IDs, event text |
44
+ | Causal form | block-causal attention with cross-block KV cache, 8 latent frames per block, 20-frame local window + 4 persistent sink frames, frustum-overlap retrieval for revisit trajectories |
45
+ | Bidirectional form | full spatiotemporal attention over the clip, 20 latent frames |
46
+ | Output | 832x480 at 24 fps; a 1280x704 preset uses the same weights |
47
+ | Hardware | trained on 2x NVIDIA L20 48 GB, runs on 1x L20 48 GB |
48
+
49
+ ## What is in this repository
50
+
51
+ | Path | Contents |
52
+ | --- | --- |
53
+ | `model-0000{1,2,3}-of-00003.safetensors`, `config.json`, `model.safetensors.index.json` | the model, bf16, 5.35B parameters, ~10.7 GB β€” one set of weights for both sampling modes |
54
+
55
+ The export is merged: the LoRA adapters are folded into the weights, so there is no adapter file to load alongside and
56
+ no `lora` entry in the configuration. Sampling in full-attention mode reads the same files β€” the checkpoint carries 898
57
+ tensors: the 885 that mode uses, the 7 action-*input* tensors (`action_embedder`), and the 6 action-*output* head tensors
58
+ described below. `config.json` records the head under `action_output_head`.
59
+
60
+ ## Quick start
61
+
62
+ Load the causal weights directly with `safetensors`:
63
+
64
+ ```python
65
+ import glob, json
66
+ from safetensors.torch import load_file
67
+ from wan_utils.wan_wrapper import WanDiffusionWrapper
68
+
69
+ cfg = json.load(open("config.json"))
70
+ model = WanDiffusionWrapper(**cfg["model_kwargs"], base_dtype="bfloat16")
71
+
72
+ state = {}
73
+ for shard in sorted(glob.glob("model-*-of-*.safetensors")):
74
+ state.update(load_file(shard))
75
+ model.load_state_dict(state) # strict: 892 tensors, exact match
76
+ ```
77
+
78
+ To sample and to post-train, use the code release, which ships the streaming pipeline, the sampling presets, the
79
+ post-training branches and a browser demo:
80
+
81
+ ```bash
82
+ git clone https://github.com/Astronex-Robotics/Astronex-World
83
+ cd Astronex-World
84
+
85
+ python wan/check_components.py # verify the VAE and text encoder are in place
86
+ bash scripts/infer_causal.sh # streaming rollout, 8 steps
87
+ bash scripts/infer_bidirectional.sh # full-attention form, same weights
88
+ bash scripts/infer_event.sh # caption switch partway through a rollout
89
+ ```
90
+
91
+ The Wan2.2 VAE and the UMT5 text encoder are not duplicated here; they come from the minWM `ckpts/` directory, or from
92
+ the official Wan2.2 release.
93
+
94
+ ## Sampling settings that matter
95
+
96
+ `config.json` carries the settings these weights were validated under:
97
+
98
+ - **8 UniPC steps** is the validated setting, with CFG 3.0 and an 8-frame inference block. The sampler also accepts 4
99
+ steps for latency experiments; quality is lower and 8 steps is what the released material uses.
100
+ - **Window 20 + sink 4 + retrieval.** The KV window is `sink + recent history + current block`, and the retrieval path
101
+ scores evicted history frames by camera-frustum overlap so a revisited place can be redrawn. Sink and window are
102
+ properties of the weights: sampling them with a different geometry changes the model's behaviour, so change them
103
+ together rather than one at a time.
104
+ - **Frames arrive in whole blocks.** Generate in multiples of 8 latent frames (23 pixel-frame steps, not 20, once the
105
+ i2v reference frame is counted).
106
+
107
+ Generation runs in the compressed video latent space; the VAE is used only for input encoding and final decoding.
108
+ Cameras enter PRoPE as intrinsics plus world-to-camera transforms, with pixel-space intrinsics normalised by the source
109
+ width and height.
110
+
111
+ ## Action-sequence output (open post-training head)
112
+
113
+ The action pathway is bidirectional by design. One direction is action *input*: a commanded 64-D action steers the
114
+ rollout. The other β€” `action_output` β€” is public in this framework and lets the model report the action it depicted,
115
+ which is what makes the representation usable as an inverse-dynamics readout for driving and robot control.
116
+
117
+ | | Interface |
118
+ | --- | --- |
119
+ | Head | `LayerNorm -> Linear(dim, hidden) -> SiLU -> Linear(hidden, 64)`, output layer zero-initialised so inserting it leaves the model unchanged |
120
+ | Input | spatial hidden tokens mean-pooled per latent frame: `(B, L, dim) -> (B, F, 64)` |
121
+ | Output | 64-D action vector per latent frame; trained with MSE on masked samples so the head cannot copy its input |
122
+ | Install / train | `action_output: true` installs the head, `control_only: [action_out]` trains that head and nothing else |
123
+ | Reference recipe | `configs/posttrain_action_output.yaml` β€” DROID robot footage, learning rate 2e-5 |
124
+
125
+ ```bash
126
+ bash Astronex-World/scripts/posttrain.sh action_output # trains the head against a frozen video model
127
+ ```
128
+
129
+ Two settings decide whether the run means anything: `control_only: [action_out]` keeps the video model frozen so the
130
+ head can be retrained at any time, and `action_output_input_dropout: 1.0` withholds the commanded action from the head's
131
+ input, so the head has to read the frames rather than its own conditioning. Embodiment-specific adapters then connect
132
+ the generic 64-D interface to joints, end effectors, grippers or a mobile base.
133
+
134
+ The head ships in this repository: six tensors, zero-initialised (LayerNorm at 1, both linears at 0), written into the
135
+ export so the parameters exist and are trainable as they stand β€” enable them with `model_kwargs.action_output: true` and
136
+ train the branch above. Reading actions from the untrained head returns zeros, so train it first. Once trained it doubles
137
+ as a probe: a head that recovers the action from generated frames is direct evidence that the action conditioning is
138
+ really steering the rollout.
139
+
140
+ ## Benchmarks
141
+
142
+ **WBench** (official evaluation code and default VLM judge, 8-step causal form):
143
+
144
+ | Split | Average | Quality | Setting | Interaction | Consistency | Physical |
145
+ | --- | --- | --- | --- | --- | --- | --- |
146
+ | Navi 158 | **73.5** | 78.2 | 73.5 | 63.4 | 83.6 | 68.6 |
147
+ | Full 289 | **70.0** | 78.3 | 73.8 | 47.6 | 82.4 | 68.1 |
148
+
149
+ Astronex-World holds the highest Average among the published WBench entries on both splits. The strongest axis is
150
+ long-horizon stability β€” background consistency 90.89, geometric consistency 89.64, temporal flicker 96.55 and motion
151
+ smoothness 98.45 on Full 289 β€” which is what block-causal KV caching, the local window and the persistent sinks are
152
+ built for.
153
+
154
+ **VBench 1.0** (official evaluation code, custom-video mode):
155
+
156
+ | Setting | Dimension | Score | Videos |
157
+ | --- | --- | --- | --- |
158
+ | Text-to-video | Motion smoothness | 0.990 | 240 |
159
+ | Text-to-video | Temporal flickering | 0.987 | 240 |
160
+ | Text-to-video | Imaging quality | 0.715 | 240 |
161
+ | Image-to-video | I2V background | 0.997 | 15 |
162
+ | Image-to-video | Temporal flickering | 0.995 | 15 |
163
+ | Image-to-video | Background consistency | 0.985 | 15 |
164
+ | Image-to-video | Camera motion | 0.485 | 103 |
165
+
166
+ **Motion retention.** Few-step causal distillation trades some subject motion for streaming latency; the
167
+ motion-preservation term in the DMD objective is what keeps rollouts from freezing (without it the same pipeline
168
+ reached roughly half the amplitude it reaches now). The bidirectional form keeps the full motion of the teacher, which
169
+ is why the release ships both forms: causal for interaction and length, bidirectional when the motion has to be exact.
170
+
171
+ ## Speed
172
+
173
+ Real-time on a single NVIDIA L20 48 GB: the causal form streams block by block with cross-block KV caching and few-step
174
+ UniPC sampling, so frames leave the sampler as the rollout is produced instead of after the whole clip is denoised. The
175
+ 4-step path and the 720p preset (same weights, larger frame) are the levers for trading quality against latency.
176
+
177
+ <!-- Citation: add the technical-report BibTeX entry here once the preprint is posted. -->
178
+
179
+ ## License
180
+
181
+ Released under the Apache License, Version 2.0 β€” see [LICENSE](LICENSE). Copyright 2026 Astronex Robotics.
182
+
183
+ ## Provenance of the causal export
184
+
185
+ Base `online_unipc25_to12_step20_full.pt` plus the 1545 `generator_ema` adapter, merged as
186
+ `W = W_base + (B @ A) * 128/64` in fp32 and cast to bf16. The merge was checked against the LoRA forward pass on real
187
+ tensors before writing: worst relative error 3.7e-7, which is fp32 rounding.