FastCWM: Streaming Code World Models That Learn from Their Own Renders
Wu et al. in Generative models
Can a world model change course without replaying its past?
FastCWM: Streaming Code World Models That Learn from Their Own Renders
Edits used to invalidate the past
Code compiles a whole scene, then renders offline; a mid-stream edit can invalidate the script and force the entire prefix to be recomputed.
Code patches and rendered chunks advance together at 17-frame boundaries; scene state and a rolling KV cache carry forward, so future edits branch without replaying earlier frames.
The same chunk boundary also connects live editing with patch-level physical and visual feedback.
How one chunk moves code and video
- 1
Patch one interval
Given the current scene state and instruction, the code policy emits a 20–50-token transition patch for each 17-frame chunk.
- 2
Resolve 3D state
A kinematics engine applies the patch, enforces contact constraints, and produces updated 3D state plus geometry, depth and semantic proxies.
- 3
Render into shared memory
A four-step causal renderer generates video while carrying a five-chunk key-value (KV) cache forward for the next chunk or edit.
One shared cache, two paths

Path (1) shows patches becoming proxies and rendered chunks on a rolling cache; path (2) forks suffixes from cached state and renderer memory just before a weak chunk.
A weak chunk localizes policy repair
- 1
Score the chunk
Offline training scores each chunk for code executability, simulated physics, and visual alignment between rendered frames, 3D proxies and the anchor.
- 2
Fork candidate suffixes
A below-threshold chunk triggers eight candidate suffixes from cached state and renderer memory just before it; the earlier prefix stays fixed.
- 3
Learn a single-pass policy
Candidate suffix scores update the code policy; deployment uses the resulting policy in one pass, without multi-candidate rendering.
One-pass policy edges out test-time search
FastCWM-Bench policy table, n=400, 3 seeds. FastCWM one-pass; Best-of-8 test-time search; paired p=0.0070 vs Best-of-8.
The gain carries to held-out scenes
On 200 held-out tasks with unseen environments, assets and unfiltered human prompts within the five benchmark domains, Stage-1 SFT succeeds on 59.5%.
FastCWM-Code reaches 74.5% success, a +15.0 percentage-point gain over Stage-1 SFT on that same split.
The evidence is on unseen configurations within the same five tested domains.
Frequency-split cues strengthen four-step rendering

Panel (a) splits geometry into low-frequency illumination and high-frequency edge cues; (b) distills a 35-step teacher to a 4-step student. FastCWM-Render scores 83.1 VBench vs 80.5 for Streaming-CWM F4 on the same stack.
Edits arrive quickly, but streams still lag
The stepwise control uses the same code policy and MiniMax-H3: offline 35-step full-script rendering took 182.0 s to first frame and first edit, and 49.19 s per chunk.
It produces the first edited RGB in 3.73 s; warm time to first frame is 4.3 s (38–43 s cold), and each 17-frame chunk takes 1.85 s.
At 24 fps, this setup runs at 0.38× real-time playback, not live speed.
Fast edits have firm boundaries
Rigid and articulated scenes
World-DSL covers rigid-body and articulated kinematics, not fluids or deformable fracture; non-rigid impacts can smear or distort objects.
Retrospective edits reset
An edit that contradicts already rendered events invalidates cached memory and requires full prefix recomputation.
Short cache horizon
The five-chunk window spans 85 frames (3.54 s); older transient details can be evicted, leaving the anchor and current proxies to carry remaining cues.
Why it matters
- Chunk alignment turns one shared cache into both an editing interface and a source of training feedback.
- For supported rigid-body and articulated tasks, practitioners can redirect future events in seconds without rerendering the prefix.
- The open question is whether longer memory, deformable physics and single-GPU streaming can extend the method without losing responsiveness.
11 slides, 3 min
9 hours ago