Now recruiting capture teams worldwide. Get paid to record first-person video of real work.

Apply to capture

Guide

How to Train Diffusion Policy on UMI Data

The UMI training workflow from raw demonstrations to a Diffusion Policy checkpoint, with a pipeline table, an observation and action table and pre-training checks, from the UMI repository and papers.
By the Firsthand capture teamLast updated November 27, 2026

Short answer

The UMI repo provides a Diffusion Policy training workflow: its README generates a Zarr replay buffer, dataset.zarr.zip, with a script, then trains with train.py and a UMI config pointing task.dataset_path at it. The policy observes wrist-camera images, relative end-effector pose and gripper width, and outputs relative pose and width sequences. Results depend on demonstrations matching the deployment task.

Last reviewed:

What is Diffusion Policy?

The Diffusion Policy paper (opens in a new tab) introduces a way of generating robot behavior by representing a visuomotor policy as a conditional denoising diffusion process. The authors report a benchmark over 15 tasks from 4 robot manipulation benchmarks and state an average improvement of 46.9% over existing methods. Those are their figures, not a result for your data. They name receding horizon control, visual conditioning and a time-series diffusion transformer as key technical contributions.

The paper defines three horizons. At time step t the policy takes the latest To steps of observations, predicts Tp steps of actions, and executes Ta of them on the robot without replanning. It describes this closed-loop action-sequence prediction as encouraging temporal consistency while remaining responsive. The diffusion policy glossary entry is the site definition. This guide covers training on UMI data; licensing is a separate question, answered in can Diffusion Policy be used commercially.

Why was Diffusion Policy used with UMI?

The UMI paper (opens in a new tab) says prior work often used simple policy representations such as MLPs with action regression loss, which limit the capacity to capture the multimodal action distributions in human data. UMI applies Diffusion Policy to model them, and states that it uses Diffusion Policy for all of its experiments, while other frameworks such as ACT could potentially serve as a drop-in replacement. The paper does not test that replacement.

What UMI data does training need?

Training reads one file: the Zarr replay buffer that the README generates with scripts_slam_pipeline/07_generate_replay_buffer.py, written as dataset.zarr.zip. As the repo names them, the buffer holds per gripper i the arrays robot{i}_eef_pos, robot{i}_eef_rot_axis_angle, robot{i}_gripper_width, robot{i}_demo_start_pose and robot{i}_demo_end_pose, per camera j the array camera{j}_rgb, and an episode_ends array in a meta group. The UMI Zarr replay buffer entry defines it.

The script writes no separate action array. When the buffer has none, the repo sampler builds the action by concatenating, per robot, eef_pos, eef_rot_axis_angle and gripper_width. The same sampler reads robot0_gripper_width by name, so renaming arrays breaks loading. The buffer is itself the output of earlier stages: the paper describes one video per demonstration, a mapping video for each new scene, and a script that matches left and right grippers and recovers actions with the SLAM pipeline.

The paper names the content a demonstration must carry for learning: wrist camera video, 6-DoF end-effector pose and continuous gripper width. That is the same set Firsthand lists per episode. Frame rate, file size and any number of episodes a buffer should hold are not stated in the sources.

What are the stages of the UMI training pipeline?

Pipeline as the README, the task config and the loader code describe it. Where the sources are silent, the cell says not stated.
StageWhat happensUMI source as named in the repoNotes
1. RecordA demonstrator performs the task with a handheld gripper and wrist-mounted fisheye camera; one video per demonstration, after a mapping video for each scene.UMI paper, data collection protocolOptional time sync for two grippers and optional gripper calibration. Counts and durations per scene: not stated.
2. SLAMRecovers end-effector pose from the recorded videos.run_slam_pipeline.py in the READMEThe README calls the SLAM stage the most fragile part of the pipeline.
3. Replay bufferWrites arrays and episode_ends into one Zarr zip.scripts_slam_pipeline/07_generate_replay_buffer.pyOutput path ends in dataset.zarr.zip.
4. ConfigPoints the task at the dataset and sets horizons and pose representation.diffusion_policy/config/task/umi.yamlDefault task.dataset_path is example_demo_session/dataset.zarr.zip.
5. Load and sampleUmiDataset copies the zip into memory (or a cache), then a sequence sampler cuts observation and action windows.UmiDataset and the samplerval_ratio is 0.05 in the shipped config; at least one episode is held out.
6. TrainFits the policy on the windows.train.py, config train_diffusion_unet_timm_umi_workspaceSingle GPU, or accelerate for several. Training time: not stated.
7. Deploy and evaluateRuns a checkpoint on a robot setup.eval_real.py in the READMENeeds robot hardware set up per the README; not covered here.

Pipeline as the README, the task config and the loader code describe it. Where the sources are silent, the cell says not stated.

What are the observations and actions?

The paper states that the policy takes a sequence of synchronized observations, RGB images, relative end-effector pose and gripper width, and produces a sequence of actions, end-effector pose and gripper width. The task config makes this concrete. Names and values below are the shipped defaults for a single gripper, not requirements for every dataset.

Single-gripper defaults from the task config umi.yaml. Horizons are numbers of steps; the config sets obs_down_sample_steps to 3.
Input or outputWhat it holdsSource
camera0_rgbRGB image, shape [3, 224, 224], image observation horizon 2.Task config
robot0_eef_posEnd-effector position, shape [3], low-dimensional horizon 2.Task config, replay buffer
robot0_eef_rot_axis_angleEnd-effector rotation stored as axis-angle, used in a 6-number rotation_6d form.Task config, UmiDataset
robot0_gripper_widthContinuous gripper width, shape [1], horizon 2.Task config, replay buffer
robot0_eef_rot_axis_angle_wrt_startRotation relative to the episode start pose, built from robot0_demo_start_pose.Task config, UmiDataset
actionSequence of 10-number steps (shape [10], rotation_6d), action horizon 16.Task config

Single-gripper defaults from the task config umi.yaml. Horizons are numbers of steps; the config sets obs_down_sample_steps to 3.

How does the UMI repo train a policy?

The README has a section titled Training Diffusion Policy. These commands are quoted from it. The first generates the buffer, the second trains on one GPU, and the third uses accelerate for several. The README says the single-GPU command was tested on a GPU with 24 GB, and it installs the environment from conda_environment.yaml and says it was only tested on Ubuntu 22.04.

Commands quoted from the UMI README
python scripts_slam_pipeline/07_generate_replay_buffer.py -o example_demo_session/dataset.zarr.zip example_demo_session

python train.py --config-name=train_diffusion_unet_timm_umi_workspace task.dataset_path=example_demo_session/dataset.zarr.zip

accelerate --num_processes <ngpus> train.py --config-name=train_diffusion_unet_timm_umi_workspace task.dataset_path=example_demo_session/dataset.zarr.zip

To train on your own data, the README pattern is to replace the path after task.dataset_path= with your own replay buffer. The README also offers a processed in-the-wild cup arrangement dataset as a zarr.zip and trains on it with the same multi-GPU command. Beyond that, the repo workspace config shows what the run does, as defaults the authors ship:

  • A DDIM noise scheduler with 50 training timesteps and 16 inference steps, which matches the paper statement for all its tasks.
  • A pretrained CLIP-family ViT vision encoder from the timm library, not frozen, with RandomCrop at ratio 0.95 and ColorJitter. A config comment says RandomRotation is not compatible with BF16, while the paper lists a rotation augmentation, so the two differ.
  • A batch size of 64 and 120 epochs in the default workspace config.

The authors paper reports different settings per task in its hyperparameter table. For its in-the-wild cup arrangement policy it lists an image observation horizon of 1, a proprioception horizon of 2, an action horizon of 6, a 10 Hz environment frequency, 224 by 224 images, a CLIP-pretrained ViT-L/14, 50 epochs and a total batch size of 512. The released config uses an action horizon of 16 and an n_action_steps of 8, and the sources do not reconcile the two. Treat the config as the starting point and the paper as the settings the authors reported.

What do relative trajectory actions and latency matching change?

Two design choices shape what the training data must contain. The first is the relative trajectory action. The paper defines it, for an action sequence starting at t0, as a sequence of SE(3) transforms giving the desired pose at t relative to the initial end-effector pose at t0, and says it makes the system more robust to tracking errors during data collection and camera displacements. The task config sets both obs_pose_repr and action_pose_repr to relative. See the relative trajectory action representation entry.

In its cup arrangement ablation the authors report 20 of 20 successes with relative actions, 16 of 20 with delta actions and 5 of 20 with absolute actions, and attribute the absolute result to calibration error between SLAM and robot frames. It is a single task, so read it as the authors evidence for their setup only.

The second is inference-time latency matching. The paper measures the latency of each observation stream, aligns observations to the slowest stream, usually the camera, down-samples camera images to the desired frequency and linearly interpolates the other streams at the image capture timestamps. On the action side it sends commands ahead of time and discards actions that are already outdated. Without it, the authors report a drop from 105 of 120 to 69 of 120 on a dynamic tossing task. The inference-time latency matching entry covers the term.

The task config carries per-stream latency fields and a dataset_frequeny field that is set to 0 with a comment reading 59.94. What to set for another dataset is not stated, so read the loader code and measure your own hardware before relying on those fields.

What are the steps from raw demonstrations to a trained policy?

This is a workflow assembled from the README, the config and the two papers, with the lab doing the work. It is not a procedure the authors publish end to end.

  • Write the task spec: task, scenes, success rubric and the deployment robot. The paper filters demonstrations by robot kinematics when the base location and kinematics are known.
  • Match the deployment camera to the demonstration camera. The paper places the same wrist-mounted camera at the same position relative to the fingers on the robot.
  • Collect one video per demonstration, with a mapping video first for each new scene.
  • Run run_slam_pipeline.py on the session folder and read the printed usable share and dropped-demonstration count.
  • Generate the replay buffer with the README script.
  • Check array names, episode_ends, task.dataset_path, horizons and the relative pose settings against your data.
  • Train with the README command on one GPU, then scale with accelerate.
  • Deploy a checkpoint with eval_real.py and score trials against the written rubric.

To convert the same buffer into other training layouts, see the guides for LeRobot and UMI dataset formats.

How do you check the data before training?

  • SLAM yield: the README prints the share of raw data that was usable and the number of dropped demonstrations. For its example data it reports 99% usable and none dropped, and says to recheck the collection instructions if your rate is low.
  • Array integrity: every data array has the same first dimension, equal to the last value of episode_ends, and the names match the config.
  • Episode length: with action_padding off, an episode shorter than the action window contributes no training samples.
  • Pose sanity: trajectories are plausible for the robot you will deploy on, since the paper filters by kinematic feasibility.
  • Coverage: scenes, lighting and objects look like the deployment setting. The README notes a known issue, a policy that does not work well in direct sunlight because the data was collected in a rainy week.
  • Labels: outcome labels and task text are not in the replay buffer, so keep them in your own metadata.

Run the UMI data quality checklist on the raw episodes too. A buffer that loads without error can still hold poor demonstrations.

What can go wrong?

  • Key mismatch: the sampler and config expect the repo array names, so a buffer with other names fails or silently loses inputs.
  • Latency left unmeasured: the paper shows how timing mismatch hurts dynamic tasks, and the shipped latency fields are for the authors hardware.
  • Absolute actions without precise calibration: the authors report a large drop for absolute actions in their ablation.
  • Narrow data: the authors report that a policy trained on narrow-domain data from one lab did not move toward the cup in unseen environments, a 0% success rate.
  • Texture-poor scenes: the paper limitations say SLAM action recovery needs sufficient texture in the environment.

How much data do you need?

Neither the README nor the papers set a general number. They report what the authors collected, and these are theirs. In the UMI paper: 305 episodes by 2 demonstrators for narrow-domain cup arrangement, 280 for dynamic tossing, 250 from two demonstrators for cloth folding and 258 from one demonstrator for dish washing. For its in-the-wild cup arrangement policy it reports 1,400 demonstrations by 3 demonstrators at 30 locations within 12 person-hours.

On that policy the authors report 43 of 60 trials succeeded, 71.7%, in two unseen environments. These counts depend on the task and the evaluation, so use them to scope a spec, not to promise a result.

How does Firsthand deliver custom UMI-style data for policy training?

Firsthand runs custom UMI data collection: UMI-style handheld gripper demonstrations recorded to your task spec in real homes, workplaces and factories, through our network of capture providers, on rigs we source and ship. Delivered per episode: gripper-camera video, 6-DoF end-effector trajectory, continuous gripper width, IMU, timestamps, task and episode metadata, and success and failure labels. Paired head-mounted egocentric video is available on request.

This is fast, on-demand custom UMI data collection at scale through a network of thousands of capture providers, for a consistent, recurring data flow to labs. Firsthand delivers data and the lab trains the policy: Firsthand does not train diffusion policies, as the diffusion policy entry states, and this page does not claim any policy was trained on Firsthand data. The site lists six delivery formats on the formats index: RLDS, LeRobot, WebDataset, HDF5 and zarr, Rerun .rrd and the episode schema. A UMI-compatible Zarr replay buffer is not stated, so delivery format is scoped on request, as are force/torque, tactile and gripper depth.

Name your robot, your task and the format your training code reads in the spec. See UMI data collection services, UMI data for VLA training, what UMI is and how UMI variants differ, or request a custom UMI dataset.

Firsthand is not affiliated with, endorsed by or related to the UMI authors, the Diffusion Policy authors, their institutions or any gripper or camera maker.

FAQ

How to Train Diffusion Policy on UMI Data, answered.

01

Can you train Diffusion Policy on UMI data?

Yes. The UMI paper states that it uses Diffusion Policy for all its experiments, and the repo README gives a training command that reads a UMI Zarr replay buffer. Results depend on your data, task and setup, and no source states a result for them.

02

Does the UMI repo include training code?

Yes. The README has a Training Diffusion Policy section with a single-GPU command and an accelerate multi-GPU command, both using the train_diffusion_unet_timm_umi_workspace config and a task.dataset_path argument.

03

What does a UMI policy observe and output?

Per the UMI paper, it observes a sequence of synchronized RGB images, relative end-effector pose and gripper width, and outputs a sequence of end-effector pose and gripper width as actions, in a relative trajectory form.

04

Do I need my own robot to use UMI data?

Not to collect it: the paper says UMI removes the need for physical robots during data collection. The README training commands name no robot either. Deploying a checkpoint needs a robot with a matching camera and gripper setup, set up as the README describes.

05

How much data does UMI training need?

The sources set no general number. The UMI paper reports counts for its own tasks, from 250 to 305 demonstrations per narrow-domain task and 1,400 for its in-the-wild cup arrangement policy. Those are the authors figures.

06

Can Firsthand data be used to train Diffusion Policy?

Firsthand delivers data and the lab does the training. The site lists RLDS, LeRobot, WebDataset, HDF5 and zarr, Rerun .rrd and the episode schema as delivery formats. A UMI-compatible Zarr replay buffer is not stated, so format is scoped on request.

07

Where can I get custom UMI data?

From Firsthand custom UMI data collection: UMI-style handheld gripper demonstrations recorded to your task spec, at scale through a network of thousands of capture providers. Delivery format is scoped on request.

Sources

Where is this documented?

Check it against the sample pack.

40 episodes across 4 environments, delivered in the exact schema these guides describe.