lerobot123 / README.md
jafermarq's picture
Show minimal how-to
04d8443 verified
metadata
library_name: lerobot
tags:
  - diffusion-policy
  - model_hub_mixin
  - pytorch_model_hub_mixin
  - robotics

This model has been pushed to the Hub using the PytorchModelHubMixin integration:

Quickstart

The checkpoint in this repository is obtained by running the Flower x LeRobot quickstart-example. This is the global model at round 35 which seemed to give good results.

Install LeRobot

Install the version of LeRobot used by the example (the latest commit at the time the example was put together, mid Dec'24). You might want to try using a more recente version.

pip install "lerobot[pusht] @ git+https://github.com/huggingface/lerobot.git@96c7052777aca85d4e55dfba8f81586103ba8f61"

Load checkpoint

from lerobot.common.policies.diffusion.configuration_diffusion import DiffusionConfig
from lerobot.common.policies.diffusion.modeling_diffusion import DiffusionPolicy
from lerobot.common.datasets.lerobot_dataset import LeRobotDataset

dataset = LeRobotDataset("lerobot/pusht")

cfg = DiffusionConfig(down_dims=[256, 512, 1024])
policy = DiffusionPolicy(cfg, dataset_stats=dataset.stats)
policy.from_pretrained("jafermarq/lerobot123")

print(policy)