sunnypilot's driving model starts from comma's CHD (the small "cheddar" vision model). For this model we kept CHD's vision exactly as comma shipped them and taught everything after them: how hard to brake for a red light, how to steer at your car's real lag +/- .1-.8s, when to give up speed before a curve. That only works if we can watch a candidate drive on its own through thousands of minutes. This post covers how we built that setup:

1\. The reprojective simulator, which starts with the real world and replays logged drives while the model is in control, plus the car fits that make the simulated car respond like the real one.

2\. A sample: 5s samples from a red light, stock CHD and our candidate x19 side by side.

3\. How x19 was trained: frozen vision, imitation, DAgger, rewards and reinforcement learning.

4\. A distilled world model that keeps a rollout going after reprojection breaks down, for example through a full lane change. Current x19 was trained with a custom blenced world model that uses FLOWM reprojection blended with a learned WM for the pixels FLOWM couldn't see past.

5\. What comes next: full-frame small models, utilizing fovea 4x4 peripherals to allow full frame on small-model at under 42ms max. Next, a better world model built from the three here.

\---

The reprojective simulator: let the model drive a real recording

A logged drive only shows what the human did. If you feed a model the recording, it can never make a mistake that changes what it sees next, so every error it would make in a car stays hidden. To learn from its own mistakes, the model has to see the road from wherever \it\ steered the car. comma made this point in their world-model paper (Goff et al. 2025) and their earlier warp-based lateral training. A reprojective simulator gets there cheaply:

\- Estimate the depth of every pixel in a logged frame.

\- When the simulated car is some metres to the side of, ahead of, or yawed from where the real car was, move every pixel by its depth to where the virtual camera would see it.

\- Feed that frame to the driving model exactly as the car would.

\- Send the model's command through the car's own controllers and a response fitted to that car.

\- Step forward and repeat.

The model now sees the consequences of its own steering and braking. The world doesn't react (the lead car does what it did in the log), but the car's own pose does.

What makes ours more accurate:

\- Depth anchored to the real world. A trained monocular depth network runs on both cameras. Each frame's scale is fitted to the road plane (the calibration says how high the camera sits) and to the radar leads, which puts the lead's depth within about 5% (median).

\- Reprojection at the model's own pixels. The image is rewritten at exactly the camera pixels the model's input warp samples, so every model reads it through its own warp. On a 20 s highway clip checked against where each point really was, road pixels land 0.01 px off and standing objects 2.2 px (median), against 46 px for a flat-road warp.

\- The model fed as on the drive: the same lateral delay, camera offset, smoothing and actuator delay the car used. On its own logged frames a model reproduces its logged action within a few hundredths of a m/s².

Car fits: the simulated car responds like your car

A simulator that steers a generic perfect car tells you little about a Hyundai with a slow rack or a Toyota with a jerk limiter. So every simulated car is fitted to a real drive of that car:

  • the car's parameters and the exact controller code it ran;

\- lateral: the torque limiter, the EPS and the rack, fitted by speed, with the car's own closed-loop response at low speeds where a rack can't be fitted;

\- longitudinal: the longitudinal controller, the brand's shaping, and the car's response to what was sent (delay, gas and brake gain by speed, drag), plus the "road's push" (wind, grade, regen) the logged car met.

Half the drive fits and the other half checks. A fit that can't replay its own drive within a few percent is rejected.

How close this gets, on a Kia Niro EV:

\- The longitudinal controller replays the logged accel to 0.8%, and the brand's shaping replays what was sent to 0.5%.

\- Closed loop over 25 s: a highway clip where the lead brakes from 21.5 to 12 m/s stays within 1.75 m of the real car, and a stop-and-go clip within 0.93 m. Lateral stays within 0.12 m. The first runs, before this work, were 7 m off.

\- On eleven held-out segments from newer drives, 10 of 11 stay within 4 m over 25 s, with speed 0.06 m/s rms off the log.

We have fits for 26 cars so far, across Hyundai, Kia, Genesis, Toyota, Lexus, Honda, Acura, Tesla, Rivian, GM, Ram, Audi, MG and Peugeot. They're how we can say "this model will steer like that on your car".

From one rollout to ten thousand frames a second

Training needs thousands of rollouts, so the simulator steps them all together on one GPU:

\- One captured CUDA graph per frame. Warp, depth reprojection and image packing are a single kernel, and the whole frame (model, controllers, teacher) replays without per-rollout Python.

\- A batched TensorRT engine for the driving model.

\- Controllers compiled, not ported. The car's real controller code is traced once and compiled to GPU functions, so the simulated car runs whatever controller versions the drive ran, with nothing rewritten by hand.

\- Live NVDEC decode. Frames and depth stream from the decoded video into GPU slots while the previous step runs. Noisy copies of a clip share one decode. NVIDIA PhysicalAI-AV clips are remapped to comma's cameras on the GPU, so a round can mix comma and NVIDIA drives.

On an RTX 5090, 96 rollouts run at 10.8k frames/s for lateral (\~9k with longitudinal), against \~350 for the one-at-a-time simulator. The same code runs on a Mac at \~700 frames/s, so most evaluation never touches the training server.

One last thing is we created a GPU pool based on our 5090 server which can execute tasks and model training on our GPU network of devices, feeding back to the server stack each job, which gives us access to significantly more compute than just using our single server stack, while scaling rollouts by 10x.

Where it stops: \~1–2 m and \~40°

Reprojection only moves pixels the logged camera saw:

\- Lateral. Held 0.5–1.0 m off, the model's lane lines land 5–10 cm from where they should, as confident as on center. At 1.7 m that's 15–20 cm, and it's half as sure.

\- Longitudinal. The lead holds to about ±8 m along, and breaks at ±12.

\- Large offsets and turns. Past about 2 m across or 40° of yaw, whatever the camera never saw stretches from the nearest surface it did see.

Goff et al. list the same family of limits: a static world, depth noise, occlusions, lighting, and range. They also note a policy can learn to read the artifacts. We stop every rollout at 2 m / 40°. On 20 evaluation rollouts, 9 had to stop there: 7 lane changes the log never made, and 2 turns started 1 m off. Section 4 shows how we get past that.

\---

Sample: a red light, stock CHD vs x19

\A red light from a user's Kia Niro EV drive, 5.0–10.0 s into the clip. The driver creeps up at 1.3 m/s and stops at 7.85 s for a 10 s red. Each panel is that car's own camera, reprojected by depth to where the simulated car is. Same clip, same fitted Kia, same lateral delay.\

Stock CHD has no traffic-light input, so it drives on with the plan. This light is hard even with one: our light net reads red at about 0.9 well before the line, but a correction that's limited to small residual changes around the plan can't stop a car whose plan wants to speed away. x19 learned to act on that red signal.

Past about 8 m along, stock's panel is beyond what reprojection holds, so read its later frames as "it has left", not as a faithful picture. The smeared band at the bottom of x19's panel is road under the hood, which the logged camera never saw, stretched as the simulated car falls back. Stock moves 82.5 m past where the driver stops, where x19 stops 1.1 m before where the driver stops and waits until the light turns green.

\---

How x19 was trained

Keep CHD's vision frozen

CHD is a vision trunk feeding two policies:

\- an off-policy head that predicts the human's plan;

\- an on-policy actor that summarizes recent frames over time, is told the car's lateral delay, and outputs a residual action on top of the plan.

We did not train the vision trunk for x19; every head reads CHD's frozen features. That keeps three things true:

\- the model can't forget how to see;

\- every new head starts from features comma trained on far more driving than we have (2.5 million minutes);

\- a new build drives exactly like base CHD until its new parts train, because every new parameter starts at zero.

The OPTED paper (Da Col et al. 2026) makes the same call: its camera student trains only the planning decoder, with the backbone frozen.

Lateral and longitudinal, split

CHD's actor outputs lateral and longitudinal together. We want to fix braking without moving steering, and the other way round, so we split the actor's output into a lateral head and a longitudinal head that read the same frozen summary. Both start as exact copies of CHD's own weights, so the split model drives identically until training moves one of them. A steering round leaves braking alone, and a braking round leaves steering alone: in x19's last braking round, held-out steering didn't move at all.

Off-policy, then on-policy: DAgger with a privileged teacher

Each new skill goes through the same loop:

1\. Imitation, off-policy. Fit the new parts to labels on logged comma drives: light states we checked by hand, a curve-speed teacher, map speed limits.

2\. DAgger, on-policy. Let the current student drive the training clips in the simulator. A privileged teacher labels every state the student actually reached, the next student trains on all rounds so far, and we repeat.

The teachers know things the camera doesn't:

\- Lateral: a model-predictive planner in the simulator. At every frame it solves, against \this car's\ fitted response, the steering that gets the car back to the lane centre, so the label already accounts for the car's lag. Rollouts start on and off the path, on cars drawn from the fits, at lateral delays from 0.15 to 0.85 s.

\- Longitudinal: an auto-labeled dataset (stop-and-go rules, hold at a red, launch on green, a speed floor) that know where the light and the stop line are, plus where the human driver actually stopped. The student learns to do inside the network what those labels do. x19 runs with none of the explicit labels in its graph.

Rewards and RL

Imitation can only be as good as the teacher. On top of it, x19's longitudinal side went through rounds of reinforcement learning on simulator rollouts:

\- Exploration. Each training clip runs as several copies, each with its own random noise on the actions.

\- Rewards. Every rollout is scored on what matters for a driver:

\- stopping where the human stopped, not short and not past;

\- following distance;

\- comfort (acceleration and jerk);

\- stalling when the road is clear;

\- speeding, and rolling through stop signs.

\- Collisions and leaving the driver's path end the episode at a large cost.

\- Group-relative advantages. Each copy is scored against the other copies of the \same\ clip, as in GRPO, so a hard clip and an easy clip both teach something.

\- Reward-weighted updates. The policy is pulled toward the actions of the copies that beat their group, alongside the imitation targets.

This follows the "supervised first, then RL on reward-scored rollouts" recipe (Peng et al. 2024; Dagda et al. 2026).

We're also bringing in a twin critic: a TD3-style pair of value networks, from comma's open training code. The critic reads privileged simulator state the policy never sees: the driver's speed, distance to the driver's stop, the lead's gap and speed, path offset and heading. That's the asymmetric actor-critic pattern. x19 itself was trained with the reward-weighted updates, and the critic is held out in the one-to-four rollout split.

In every case RL is a separate branch that starts at zero, on a frozen trunk. It is never a fine-tune that overwrites what imitation learned. That's the argument of Lian et al. (CVPR 2026 Findings, "Fine-tuning is Not Enough"): run RL in parallel with imitation, so the imitation policy stays intact. We took that structure only, not their trajectory sampler or their run-time reward model.

Fixing the red light without breaking every other stop

The red light in section 2 showed a hard limit. The learned braking was a small correction around the plan, capped at about 1 m/s², so when the plan wanted +1.3 m/s² the car crept on. Widening the cap fixed that light but changed hard braking everywhere: other reds stopped metres short.

x19 instead adds a separate braking head that starts at zero, reading the model's temporal summary and the light features, with up to 1.5 m/s² of extra braking. Trained on where drivers really stopped at low speed:

\- it adds about −1.3 m/s² on the approach to that red, and stops about 1 m short of the driver;

\- everywhere else it moves the final acceleration by only about ±0.05 m/s².

The extra headsAround the actor sit sunnypilot's own heads, each starting at zero and trained with the same loop:

\- Light net. A light classifier and a learned gate, trained on hundreds of thousands of frames where we checked which signal is *\*ours\**, so a green further down the street doesn't count. With those labels, releases at real reds on held-out drives fell from 1.84% to 0.13%.

\- Turns. A turn head with memory for turns at lights, and a lane change head, both trained by DAgger in the simulator. (removed in next model moving to full-frame)

\- Curve and calm. A curve-speed head that gives up speed before a curve to stay under a lateral limit, and a low-speed calm head which reduces vision noise in the model by limiting high frequency visual noise, which reduces oscillation on higher lateral delay vehicles at 8m/s to 0m/s.

x19 passes every gate in our regression suite: stop-and-go and user-reported reds, a cross-car longitudinal check, straight-road and curve suites, and the full closed-loop ship suite. It runs at 33.4 ms p50 on a comma 3X, the same as before the new head.

\---

Past the reprojection limit: a distilled world model

When a rollout crosses \~2 m or \~40°, it used to stop. The rollouts that stop are the ones we most want to see: lane changes the human never made, and recoveries from far off the line. comma published a world model trained on comma5k, worldmodel-4B (a 4B video diffusion transformer with fp8 attention, NVFP4 MLPs and future anchoring), with its autoencoder vit-ae-2x-f8c32. Goff et al. train a policy inside such a model. We use it as a blended fallback for frames reprojection can't make. Current models use a blended policy reprojective simulator blended with commas base worldmodel-4b for out of bounds lane turns/ distance +/- 8m of gt.

The fallback.

\- As a rollout approaches the 2 m / 40° limit, its frames cross-fade from reprojection to the world model, and back once the car returns.

\- At 5 Hz the model generates the camera's view at the simulated pose from the last few frames the driving model saw, plus a logged frame a few seconds ahead as an anchor. The frames in between are warped over the road plane.

\- With it, all 20 evaluation rollouts render to the end of their clips.

Run alongside reprojection, its similarity to the reprojected frame stays flat from 0 to 2 m off (PSNR about 24 dB), so its pose and geometry agree with the simulator's.

We distilled it to one step:

\- QLoRA (Dettmers et al. 2023): low-rank adapters on the frozen fp8/NVFP4 base, so a 4B model fine-tunes next to a training job on one GPU.

\- Regression onto samples from the 8-step model. It scores like the 8-step model on logged frames, but blurs in a simulated lane change.

\- DMD / DMD2 (Yin et al. 2023, 2024): distribution-matching distillation. Sharper for about a second, then the one-step model drifts on its own outputs.

\- Self-Forcing (Huang et al. 2025): train on the one-step model's \own\ autoregressive rollouts, so it learns to recover from its own errors. Rolling 4, then 12 frames on its own outputs is what made it hold.

The result, our distilled WM, runs at 30 ms/frame in the simulator vs 74 ms for comma's model at 8 steps, holds both daytime lane changes, and ends near the 8-step model.

\A left lane change the human never made, 7.2–20 s into the rollout. Left: the reprojective sim at the simulated pose. Middle: the distilled WM, which is what the driving model saw. Right: comma's world model at 8 steps, in its own rollout. The caption shows how far the simulated car is from the logged path and how much of the frame comes from the world model.\ This above model has hallucination as you can see and was not included in the rollouts for the current x19 (Chronos) trained model.

\---

What comes next

\- World-model rollouts as training data. With the fallback, rollouts past 2 m / 40° stay usable, so lane changes and wide recoveries can join the DAgger and RL rounds instead of being cut. The night turn has to pass first.

\- Full frame. CHD's trunk sees a narrow crop. Our full-frame models keep that crop at full resolution and add the whole frame from both cameras as a periphery.

\- Offline they already beat the narrow model on plan and action likelihood.

\- In closed loop that hasn't carried over yet, and they cost 41 ms max against x19's 33.4 ms.

\- Critic-trained rounds with the privileged twin critic, for both braking and steering.

\- More cars. Every car we fit makes the simulator answer for one more car. The more drives people share, the closer "it passed in sim" gets to "it drives well on my car".

\---

Sources and how we used them

\- Goff, Hogan, Hotz et al. (comma), "Learning to Drive from a World Model", 2025 — \arXiv:2504.19077\; companion post \blog.comma.ai/mlsim\. The basis for training on-policy in a reprojective simulator and for a policy without hand-written rules. Its list of reprojection limits matches ours. comma's open training code is where the residual actor and the twin-critic loss come from.

\- comma, worldmodel-4B and vit-ae-2x-f8c32 — \ huggingface.co/commaai/worldmodel-4B \, \ huggingface.co/commaai/vit-ae-2x-f8c32 \ (MIT). The world model we distil and the autoencoder it generates in.

\- Da Col et al., "OPTED: On-Policy Fine-Tuning for End-to-End Driving using a Render-Free Teacher", 2026 — \arXiv:2609.20756\. A privileged teacher labels the states a camera student reaches in closed loop, with the vision backbone frozen. That is our DAgger with the simulator's teacher. (The asymmetric critic is a separate, standard pattern, not from OPTED.)

\- Peng et al., "Improving Agent Behaviors with RL Fine-tuning for Autonomous Driving", 2024 — \arXiv:2409.18343\. Supervised pretraining, then RL fine-tuning on reward-scored closed-loop rollouts.

\- Dagda et al., "Competent Autonomous Driving Through Fine-Tuning Vision–Language–Action Models with Symbolic Traffic Rules", 2026 — \arXiv:2611.20648\. Supervised first, then RL with group-normalized advantages (GRPO and its variants). That's our scoring of noisy copies of each clip against each other.

\- Lian et al., "Fine-tuning is Not Enough: A Parallel Framework for Collaborative Imitation and Reinforcement Learning in End-to-end Autonomous Driving", CVPR 2026 Findings — \paper\. RL as a parallel branch that leaves imitation intact: our frozen trunk with zero-start heads, lateral and longitudinal trained separately. Not used: their tree-structured sampler for directed exploration, or their run-time reward model.

\- Kim et al., "Hydra: Multi-head Low-rank Adaptation for Parameter Efficient Fine-tuning", 2023 — \arXiv:2309.06922\. An analogy, not a source: separate low-rank branches off one frozen shared layer, as our lateral and longitudinal heads branch off one frozen shared summary, starting as CHD's own weights.

\- Yin et al., DMD (2023, \[arXiv:2311.18828\](https://arxiv.org/abs/2311.18828)) and DMD2 (2024, \[arXiv:2405.14867\](https://arxiv.org/abs/2405.14867)). Distribution-matching distillation, the step-distillation loss for the world model.

\- Huang et al., "Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion", 2025 — \arXiv:2506.08009\. Training on the model's own rollouts, the step that made the distilled WM hold a lane change.

\- Dettmers et al., "QLoRA", 2023 — \arXiv:2305.14314\. Low-rank adapters on a frozen quantized base.

\- comma blog, background reading:

\- \End-to-end lateral planning\ (2021): a warp simulator, models that learn to spot the warp, and a frozen encoder with a new policy head, the shape our frozen-vision approach takes.

\- \RL for car controls\ (2024).

\- \Bugs that broke driving\ and its \machine learning edition\ (2026).

\- Considered for getting past the reprojection limit, not adopted: \OpenDriveLab's autonomous-driving work\ and NVIDIA's \EmerNeRF post\. Per-scene reconstruction needs a fit for every scene, and those models aren't trained on comma cameras. We needed generation from a pose, at batch speed, so we went with comma's world model.



Discuss this on our forum.