ProjectsRobot learning

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.

CompletedNov 2026Page updated

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
On this page

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?

0.1110100100 steps (DDPM)24.3010 steps (DDIM)2.445 steps (DDIM)1.233 steps (DDIM)0.752 steps (DDIM)0.521 step (DDIM)0.27SecondsSeconds per chunk, log scaleA chunk lasts 0.8 s0.1110100100 steps24.3010 steps2.445 steps1.233 steps0.752 steps0.521 step0.27SecondsSeconds per chunk, log scaleA chunk lasts 0.8 s
Show these values as a table
RowSeconds per chunk, log scaleNote
100 steps (DDPM)24.30100 steps, DDPM
10 steps (DDIM)2.4410 steps, leading
10 steps (DDIM)2.4410 steps, trailing
5 steps (DDIM)1.235 steps, leading
5 steps (DDIM)1.235 steps, trailing
3 steps (DDIM)0.753 steps, leading
3 steps (DDIM)0.753 steps, trailing
2 steps (DDIM)0.522 steps, leading
2 steps (DDIM)0.512 steps, trailing
1 step (DDIM)0.271 step, trailing
Time to compute one action chunk. The 100-step time is one chunk timed after a warm-up; each DDIM time is the median of 5 fresh chunks. Batch size 1, 32-bit floats.Recorded . Source: ddim*.json, FINDINGS.md

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
020406080100100 steps, DDPM5810 steps, leading5010 steps, trailing685 steps, leading585 steps, trailing503 steps, leading643 steps, trailing482 steps, leading442 steps, trailing461 step, trailing0Solved, %Episodes solved, %050100100, DDPM5810, lead5010, trail685, lead585, trail503, lead643, trail482, lead442, trail461, trail0Solved, %Episodes solved, %
Show these values as a table
RowGroupEpisodes solved, %Note
100 steps, DDPM100-step DDPM5829 of 50, 95 % interval 44 to 71 %
10 steps, leadingDDIM, leading spacing5025 of 50, 95 % interval 37 to 63 %
10 steps, trailingDDIM, trailing spacing6834 of 50, 95 % interval 54 to 79 %
5 steps, leadingDDIM, leading spacing5829 of 50, 95 % interval 44 to 71 %
5 steps, trailingDDIM, trailing spacing5025 of 50, 95 % interval 37 to 63 %
3 steps, leadingDDIM, leading spacing6432 of 50, 95 % interval 50 to 76 %
3 steps, trailingDDIM, trailing spacing4824 of 50, 95 % interval 35 to 61 %
2 steps, leadingDDIM, leading spacing4422 of 50, 95 % interval 31 to 58 %
2 steps, trailingDDIM, trailing spacing4623 of 50, 95 % interval 33 to 60 %
1 step, trailingDDIM, trailing spacing00 of 50, 95 % interval 0 to 7 %
Share of 50 PushT episodes solved, with 95 % Wilson intervals. Leading and trailing are two ways of spacing the few timesteps that remain.Recorded . Source: ddpm100-eval-info.json, ddim*.json
SamplerTime per chunkSolved95 % intervalOnly this / only baselinep
100 steps, DDPM24.30 s29 of 50 (58 %)44 to 71 %
10 steps, leading2.44 s25 of 50 (50 %)37 to 63 %8 / 120.50
10 steps, trailing2.44 s34 of 50 (68 %)54 to 79 %16 / 110.44
5 steps, leading1.23 s29 of 50 (58 %)44 to 71 %10 / 101.00
5 steps, trailing1.23 s25 of 50 (50 %)37 to 63 %11 / 150.56
3 steps, leading0.75 s32 of 50 (64 %)50 to 76 %13 / 100.68
3 steps, trailing0.75 s24 of 50 (48 %)35 to 61 %12 / 170.46
2 steps, leading0.52 s22 of 50 (44 %)31 to 58 %8 / 150.21
2 steps, trailing0.51 s23 of 50 (46 %)33 to 60 %9 / 150.31
1 step, trailing0.27 s0 of 50 (0 %)0 to 7 %0 / 29under 0.001
The same results as numbers. The last two columns count the seeds only this setting solved and the seeds only the baseline solved, followed by the exact McNemar p-value for that pair.Recorded . Source: ddpm100-eval-info.json, ddim*.json
The same starting position under three samplers. From left to right: 100 steps, 3 steps, 1 step. The first two push the T onto its target; the third never gets there. These are simulation rollouts computed on the Jetson.Recorded . Source: eval_episode_0.mp4 of each run

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 widthsForce encoderParametersPer step3-step chunk
512, 1024, 2048no266.6 million242.4 ms0.76 s
512, 1024, 2048yes270.3 million244.3 ms0.76 s
256, 512, 1024no78.0 million64.7 ms0.22 s
256, 512, 1024yes79.9 million66.8 ms0.23 s
Latency of two UNet widths on the same Jetson in its 15 W mode, batch size 1.Recorded . Source: bench-latency-15w-20261118.json

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.