File size: 1,473 Bytes
1f85392 04d8443 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
---
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](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
- Library: https://github.com/huggingface/lerobot
- Docs: [More Information Needed]
## Quickstart
The checkpoint in this repository is obtained by running [the Flower x LeRobot quickstart-example](https://github.com/adap/flower/tree/main/examples/quickstart-lerobot). This is the global model at round 35 which seemed to give good results.
### Install LeRobot
> [!NOTE]
> 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.
```shell
pip install "lerobot[pusht] @ git+https://github.com/huggingface/lerobot.git@96c7052777aca85d4e55dfba8f81586103ba8f61"
```
### Load checkpoint
```python
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)
``` |