cwm-proxy

The open proxy generator for Code World Model — the half that wasn't released.

What this is

Code World Model drives a video model with a proxy: a per-frame stream of metric depth and semantic-class maps that tells the model where everything is. The released code runs inference on proxies; nothing released builds them. So we built one — a scripted world simulator and CPU ray tracer, NumPy only, no weights, no GPU.

It produces proxy conditions in the released format, at the released camera intrinsics — which MiniMax-H3 accepts unmodified.

It does not reconstruct the authors' scenes. We built an inverse renderer to find out: their water surface is exactly a plane and their road is a plane to 1.4%, but everything else is film-grade mesh. On a stationary frame, re-rendering their own recovered point cloud costs 0.03% depth error; our fitted primitives cost 0.60% — about 20× worse. That is the honest size of the gap.

Six released examples, driven both ways

For each example we author the scenario in our proxy from the authors' own prompt, then generate video twice — once from their released conditions, once from ours — holding the anchor image, the caption and the seed fixed. The proxy is the only variable between the two clips.

ex18 — wading a canal

Chosen for water: class 2 covers 52.8% of the frame, the strongest water case in the 40. The clearest evidence the proxy is doing work — the figure sits centre-left in their DUV and centre-left in the video it drives; right-of-centre in ours, and right-of-centre in the video ours drives.

their proxy
our proxy
the video theirs drives
the video ours drives

ex36 — wide composition

Road 46.9%, sky 26.0% — far wider than our own takes tend to frame. Near-identical: surveyor on a wet road, water tower, two vehicles.

their proxy
our proxy
the video theirs drives
the video ours drives

ex31 — an animal protagonist

The protagonist is a white stag. It is semantic class 8, not 9 — which is how we learned that class 8 encodes the protagonist, not "a human". Both produce the stag; ours sits higher in frame, as our DUV places it.

their proxy
our proxy
the video theirs drives
the video ours drives

ex28 — a vehicle at close range

Class 10 covers 15.2%, the largest vehicle presence in any window 0. Both render the giant silk-moth across the cobbled lane with the cart at upper right — although our vehicles are wireframe edges where theirs are solid masses.

their proxy
our proxy
the video theirs drives
the video ours drives

ex30 — a plain walk

Their own prompt: "No vehicle, mount, carried object … is present." A baseline with nothing to place. Comparable; our vegetation is blobbier and our horizon sits higher.

their proxy
our proxy
the video theirs drives
the video ours drives

ex34 — flight

Their proxy is a high oblique vista over terrain, a lake and winding roads. Ours is a ground-level corridor. The two disagree completely — and the videos come out nearly identical. The anchor and the caption carried this shot, not the proxy. We keep this panel because six hand-picked successes would misrepresent the method: on some shots the video model is robust enough that the proxy contributes little. The underlying gap is real — a vista shot frames terrain, and our rig is a subject-following boom with no such mode.

their proxy
our proxy
the video theirs drives
the video ours drives

What we measured about the released format

Some of this is not documented anywhere we could find, and we needed it to match the format. All of it came out of the 40 released examples.

Focal length206.6 px at 336×192, IQR [204, 207] over 97 estimates. Pitch and camera height are not fixed — height spans 1.6 m to 231 m across the 40.
Semantic vocabulary{0,1,2,4,5,8,9,10} The ontology has 12 ids; only these eight ever appear. Class 8 is the protagonist, not "human" — which is why class 9 sits at 0.003%.
Class 056.5% Not a ground plane — a catch-all, planarity 1.2%–55%. Their road is a plane, but not the class-0 plane (tilt 1.4°–70.9° between them).
Two encodings15 / 25 15 examples store float32 metres; 25 store uint16 fixed-log codes in a float32 array, with a different 2×2 resample. Only metadata.json tells them apart.
Distinct geometries39 Examples 32 and 33 ship byte-identical conditions with different first frames.

Try it

git clone https://github.com/guangyliu/cwm-proxy && cd cwm-proxy
pip install numpy pillow

python take_actions.py out/my_take        # ~25 s, 484 frames of conditions + captions
python validate_conditions.py out/my_take/conditions

Then drive MiniMax-H3 with them:

python portb/run_cp.py --conditions out/my_take/conditions \
    --prompt-dir out/my_take/prompts --anchor first_frame.png \
    --windows 5 --steps 20 --tag my_take