Diffusion Policy on a Jetson, in real time
The stock Diffusion Policy needs 24 seconds to compute 0.8 seconds of actions on the robot's Jetson Orin NX. With three DDIM steps it needs 0.75 seconds, and over 50 PushT episodes I could measure no loss of success down to two steps.
Project facts
- Computer
- Jetson Orin NX 16 GB in its 15 W mode, with the robot's ROS 2 stack running
- Policy
- LeRobot's pretrained diffusion_pusht, 262.7 million parameters
- Benchmark
- PushT in simulation, 50 episodes per setting, the same seeds for every setting
- Statistics
- Wilson 95 % intervals and exact McNemar tests on same-seed pairs
- Built with
- LeRobot 0.4.4, PyTorch, Jetson Orin NX, Python
- When
- Nov 2026
- Status
- Completed
- Code
- Private repository. I can walk through it on request.
- Page updated
The question
Before training any policy of my own, I wanted to know whether a diffusion policy can run on the robot’s own computer at all. A policy that predicts a chunk of 8 actions at 10 Hz has 0.8 seconds before the next chunk is due.
With the published checkpoint and its default sampler, 100 denoising steps, one chunk took 24.3 seconds on the Jetson. That is about 30 times too slow. So the question became: how few denoising steps still work?
Loading the checkpoint correctly
The first trap came before any timing. The published checkpoint predates LeRobot 0.4, which moved normalization out of the policy into separate processor files. The checkpoint keeps its normalization statistics as 8 buffers inside the weights file.
- The processor loader refuses the checkpoint with a migration error.
- The policy’s own loading call succeeds anyway. It loads non-strictly and only logs the 8 buffers as unexpected keys. A policy loaded that way has nothing to map its outputs back to the task’s coordinates.
- LeRobot ships a migration for this. I ran it against a pinned revision, loaded the converted copy strictly, and compared it tensor by tensor with the published file: all 213 weight tensors and all 8 normalization buffers are bit-identical.
Any older LeRobot checkpoint has the same trap.
How few steps are enough?
Show these values as a table
| Row | Seconds per chunk, log scale | Note |
|---|---|---|
| 100 steps (DDPM) | 24.30 | 100 steps, DDPM |
| 10 steps (DDIM) | 2.44 | 10 steps, leading |
| 10 steps (DDIM) | 2.44 | 10 steps, trailing |
| 5 steps (DDIM) | 1.23 | 5 steps, leading |
| 5 steps (DDIM) | 1.23 | 5 steps, trailing |
| 3 steps (DDIM) | 0.75 | 3 steps, leading |
| 3 steps (DDIM) | 0.75 | 3 steps, trailing |
| 2 steps (DDIM) | 0.52 | 2 steps, leading |
| 2 steps (DDIM) | 0.51 | 2 steps, trailing |
| 1 step (DDIM) | 0.27 | 1 step, trailing |
The chunk time fits a straight line: about 29 ms plus 241 ms per denoising step. Three steps is the most that fits inside the 0.8 seconds a chunk lasts.
Speed is worthless if the policy stops working, so each setting ran the same 50 PushT episodes, with the same seeds, and was compared with the 100-step baseline episode by episode.
- 100-step DDPM
- DDIM, leading spacing
- DDIM, trailing spacing
Show these values as a table
| Row | Group | Episodes solved, % | Note |
|---|---|---|---|
| 100 steps, DDPM | 100-step DDPM | 58 | 29 of 50, 95 % interval 44 to 71 % |
| 10 steps, leading | DDIM, leading spacing | 50 | 25 of 50, 95 % interval 37 to 63 % |
| 10 steps, trailing | DDIM, trailing spacing | 68 | 34 of 50, 95 % interval 54 to 79 % |
| 5 steps, leading | DDIM, leading spacing | 58 | 29 of 50, 95 % interval 44 to 71 % |
| 5 steps, trailing | DDIM, trailing spacing | 50 | 25 of 50, 95 % interval 37 to 63 % |
| 3 steps, leading | DDIM, leading spacing | 64 | 32 of 50, 95 % interval 50 to 76 % |
| 3 steps, trailing | DDIM, trailing spacing | 48 | 24 of 50, 95 % interval 35 to 61 % |
| 2 steps, leading | DDIM, leading spacing | 44 | 22 of 50, 95 % interval 31 to 58 % |
| 2 steps, trailing | DDIM, trailing spacing | 46 | 23 of 50, 95 % interval 33 to 60 % |
| 1 step, trailing | DDIM, trailing spacing | 0 | 0 of 50, 95 % interval 0 to 7 % |
| Sampler | Time per chunk | Solved | 95 % interval | Only this / only baseline | p |
|---|---|---|---|---|---|
| 100 steps, DDPM | 24.30 s | 29 of 50 (58 %) | 44 to 71 % | ||
| 10 steps, leading | 2.44 s | 25 of 50 (50 %) | 37 to 63 % | 8 / 12 | 0.50 |
| 10 steps, trailing | 2.44 s | 34 of 50 (68 %) | 54 to 79 % | 16 / 11 | 0.44 |
| 5 steps, leading | 1.23 s | 29 of 50 (58 %) | 44 to 71 % | 10 / 10 | 1.00 |
| 5 steps, trailing | 1.23 s | 25 of 50 (50 %) | 37 to 63 % | 11 / 15 | 0.56 |
| 3 steps, leading | 0.75 s | 32 of 50 (64 %) | 50 to 76 % | 13 / 10 | 0.68 |
| 3 steps, trailing | 0.75 s | 24 of 50 (48 %) | 35 to 61 % | 12 / 17 | 0.46 |
| 2 steps, leading | 0.52 s | 22 of 50 (44 %) | 31 to 58 % | 8 / 15 | 0.21 |
| 2 steps, trailing | 0.51 s | 23 of 50 (46 %) | 33 to 60 % | 9 / 15 | 0.31 |
| 1 step, trailing | 0.27 s | 0 of 50 (0 %) | 0 to 7 % | 0 / 29 | under 0.001 |
What this does and does not show:
- No measurable cost from 10 steps down to 2. None of those eight settings differs from the 100-step baseline; every p-value is 0.21 or higher.
- That is a weak statement, and I want to be exact about how weak. With 50 episodes each estimate is good to about 14 points either way. Two steps may well cost around 10 points of success. This sweep cannot resolve that: it would take about 390 episodes per setting.
- One step fails completely. It solved no episode.
- The spacing made no consistent difference. The better one flips with the step count, and no paired comparison of the two is significant.
Against the published numbers
The baseline scored 58 % when run on the robot’s computer. The checkpoint’s published evaluation reports 65.4 % over 500 episodes, which lies inside my interval, and 74 % on the same 50 seeds I used. Seed by seed, 24 were solved in both runs, 5 only on the robot and 13 only in the published run. An exact McNemar test gives p of about 0.10, so that gap is not established either. The two runs also used different versions of the software stack.
Where the time goes
One denoising step is one pass through the UNet, and on this computer that pass takes 243 to 250 ms. The obvious remedies barely move it:
| Variant | Per step, batch 1 |
|---|---|
| 32-bit floats | 243 to 250 ms |
| With cuDNN autotuning | 243 ms |
| 16-bit autocast | 225 ms |
| 16-bit weights | 233 ms |
Peak GPU memory was 1.1 GiB, and the module drew 9.4 to 11 W against 6.1 W idle.
What does help is a smaller network. Three days later I timed the UNet I planned to train, at half the channel width, with random weights and for latency only:
| Channel widths | Force encoder | Parameters | Per step | 3-step chunk |
|---|---|---|---|---|
| 512, 1024, 2048 | no | 266.6 million | 242.4 ms | 0.76 s |
| 512, 1024, 2048 | yes | 270.3 million | 244.3 ms | 0.76 s |
| 256, 512, 1024 | no | 78.0 million | 64.7 ms | 0.22 s |
| 256, 512, 1024 | yes | 79.9 million | 66.8 ms | 0.23 s |
At that width a 3-step chunk takes 0.23 s, which leaves room for 5 steps if 3 turn out to lose quality. That is the network the force-aware grasping policies use.
Limits
- These success rates contain no latency effect. In the simulator the environment waits for the policy. On hardware a control loop that blocks while it computes a chunk would pause the robot. Real-time control on the arm, with inference running alongside execution, is not tested here.
- One checkpoint, one benchmark, 50 episodes per setting.
- I did not try TensorRT, which is the likely route to a cheaper step, and I did not profile at the kernel level, so why a step costs what it does is an inference and not a measurement.