# FastCWM: Streaming Code World Models That Learn from Their Own Renders

> FastCWM aligns incremental 3D code patches with four-step video chunks on a shared cache, so future edits branch without replaying the prefix. On the 400-task FastCWM-Bench test, training from rendered feedback reaches 83.1% success, 1.9 percentage points above test-time Best-of-8.

- arXiv: https://arxiv.org/abs/2612.01144
- Authors: Hao Wu, Fan Zhang, Yuqi Li, Yizhou Zhao, Yingli Tian, Linsey Pang, Prakhar Mehrotra, Qingsong Wen, Ming-Hsuan Yang
- Published: 2026-12-02
- Topic: Generative models
- Visual carousel: https://instaxiv.com/p/2612.01144
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## Can a world model change course without replaying its past?

**3.73 s** to first edited RGB, on five H100 GPUs

## Edits used to invalidate the past

**Offline pipelines:** Code compiles a whole scene, then renders offline; a mid-stream edit can invalidate the script and force the entire prefix to be recomputed.

**FastCWM:** 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

![Figure 2](https://cdn.instaxiv.com/figures/2612.01144/figure2.webp)

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. (Figure 2)

## 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

| Method | Success (%) | Train GPU-h |
| --- | --- | --- |
| Stage-1 SFT | 70.5±1.3% | 64 |
| Best-of-8 | 81.2±1.1% | 64 |
| Full-Trajectory GRPO | 76.4±1.5% | 384 |
| **FastCWM-Code (Iter 3) (+1.9 pp)** | **83.1±0.9%** | **384** |

_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

**Stage-1 SFT:** 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:** 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

![Figure 3](https://cdn.instaxiv.com/figures/2612.01144/figure3.webp)

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. (Figure 3)

## Edits arrive quickly, but streams still lag

**Offline baseline (4 GPUs):** 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.

**FastCWM stack (5 H100 GPUs):** 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.

Best used when: For future-only steering, waypoint redirects and target switches in rigid-body or articulated scenes.

## Key takeaways

- 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.

## Links

- arXiv: https://arxiv.org/abs/2612.01144
- PDF: https://arxiv.org/pdf/2612.01144

## Citation

```bibtex
@article{wu2026fastcwm,
  title   = {FastCWM: Streaming Code World Models That Learn from Their Own Renders},
  author  = {Wu, Hao and Zhang, Fan and Li, Yuqi and Zhao, Yizhou and Tian, Yingli and Pang, Linsey and Mehrotra, Prakhar and Wen, Qingsong and Yang, Ming-Hsuan},
  journal = {arXiv preprint arXiv:2612.01144},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.01144}
}
```
