|
--- |
|
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) |
|
``` |