Products Open source

RealView

Tesla’s in-car Reality View, rebuilt from Elon Musk’s post. Open code and open weights, trained on one MacBook. The generator never sees the camera. It paints the road from what a vision encoder understood. Version 0.2 adds a world model: steer the dream off the recorded path and train a driving policy inside it.

Version 0.2.0 · free and open source under Apache-2.0 · Python, PyTorch · tested on Apple silicon and CPU (NVIDIA GPUs untested). Unofficial: not affiliated with Tesla or Xiaomi, and none of their code, data or weights are used. 한국어

A drive the model never trained on. Left: the camera, which the generator never sees. Middle: RealView, painted from vision-encoder features and its own previous frames. Right: the same model fed the features of a night drive.

New in 0.2: a world model you can steer

Version 0.1 paints what the camera saw. Version 0.2 predicts what the camera would see if the car were steered somewhere the logs never went, so a driving policy can be trained and scored inside it. The loop follows the public description in Xiaomi’s Auto World Model 2.0 report, at laptop scale.

Left: the camera. The other three are dreams of the same drive. After 2.4 seconds of real frames, nothing comes from the camera. Same start, three steering inputs. The bar under each dream is the car’s offset from the recorded path.

Steered off the recorded pathThe dream’s offset follows the kinematic model at r = 0.93 to 0.99, with a mean error of 0.03 to 0.07 m over 8 seconds
Policy cloned from human logsLeaves the lane in 75% of 20-second dreams. The human never left the path, so it learns no correction
Same policy after RL inside the dream0% out of lane, 100% back within 0.3 m. No labels. On real warped frames its correction matches a hand-written steer-back rule at r = 0.81
Baseline with hand-written labels, no world model0% out of lane, 93% back. On this task RL in the dream removed the need for labels. It did not beat them

Both dreams start 0.8 m left of the recorded path and run for 20 seconds, shown at double speed. Left: the cloned policy. Right: the policy after RL inside the dream.

105 episodes on the two drives held out of training, each starting from a real off-route frame. The policy is handed the route’s yaw rate and corrects it from two dreamed frames. What failed first and how each number was measured are in the README.

What the post said, and what we built

  • Features in, pixels out

    A frozen DINOv2-small stands in for Tesla’s Universal Vision Encoder. Its 48 tokens per frame are all the generator gets from the camera.

  • Previous frame plus noise

    Each step starts from the last generated chunk with Gaussian noise added, as the post describes. It does not start from pure noise.

  • One step per chunk

    A conditional mean-flow model produces 8 frames from 4 encoder frames in a single network pass. That is the same 2:1 ratio as the post’s 36 fps from 18 Hz.

  • One laptop

    33 million parameters, trained for 1 hour 46 minutes on a MacBook Pro (M4 Max) using comma.ai’s open driving dataset. Tesla’s model is about 30 times larger.

Numbers

Measured with the released weights on the two drives held out of training: 5 day clips and 3 night clips, 60 seconds each, from a blank start. For each generated 0.4-second chunk we check whether its nearest real chunk is the right moment of the drive.

Features of this drive63.8% of chunks land on the right moment (day 86.2%, night 26.4%) · 24.1 dB PSNR
Features of a different drive1.5% · 14.9 dB
Features set to zero1.7% · 16.6 dB
Chance2.0%
Speed92.6 ms per 8-frame chunk on an M4 Max with the encoder and decoder included, or 86 fps of output for a 20 fps camera

Method, one-step errors and the baselines are in the README. We picked the checkpoint and noise level while looking at the same held-out drives.

Try it

git clone https://github.com/azet-llc/realview && cd realview
pip install -r requirements.txt
sh scripts/download_weights.sh
python -m realview.run --video weights/sample_day.mp4 --out out.mp4
python -m realview.dream --video weights/sample_day.mp4 --log weights/sample_day.npz --steer 0.02 --out dream.mp4

out.mp4 shows the camera on the left and RealView on the right. You can pass any forward-facing dashcam clip instead of the sample. --feats zero blinds the generator, and --feats shuffle:other.mp4 shows it a different drive. The second command dreams the same drive nudged about 0.9 m to the left. --offset 0.8 --policy weights/policy_rl.pt starts off the path and lets the RL policy steer back.

Limits

  • One car, one camera. The training clips come from one comma device on Bay Area highways in 2018. Expect worse results on city streets and other cameras.
  • Low resolution. 256×192. Lane paint at a distance, signs and far cars smear.
  • It invents detail. It paints cars that are not there and signs that change. Nothing here should inform a driving decision.
  • Small scale. This reproduces the architecture at a small scale. It does not reproduce the product.
  • The off-route views are warps. A ground-plane shear moves the road correctly and everything standing on it incorrectly. The world-model numbers are scored on those warps.
  • Lane keeping only. No other cars are in the loop, so nothing here measures collisions. The dream does not bend the road with the route, and it blurs within seconds.
  • Measured in its own simulator. The policy’s gain is measured in the world model that trained it. No policy here has driven a car.

At a glance

StatusReleased · version 0.2.0 · free
Made byAZET LLC
Model33M-parameter diffusion transformer, conditional mean-flow, one step per 8-frame chunk · 23M-parameter world model that predicts the next 0.4 s of encoder tokens
Training datacomma2k19 compression-challenge clips (MIT): 64 one-minute clips from 21 drives, 2 drives held out
LicenseApache-2.0 (code and weights) · TAESD MIT · DINOv2 Apache-2.0
Source and weightsGitHub · Release v0.2.0
Based onElon Musk’s post of November 22, 2026 · Mean Flows for One-step Generative Modeling · Xiaomi Auto World Model 2.0
Helphello@azet.io

Read it, run it, break it.

Star on GitHub

Stars tell us what to build next in the open: multi-camera input, a bird’s-eye view, and a dream whose road bends with the route.

Free and open source · Apache-2.0 · weights included