Instructions to use lerobot/diffusion_pusht_keypoints with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lerobot/diffusion_pusht_keypoints with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lerobot/diffusion_pusht_keypoints", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Migrate checkpoint to LeRobot policy processors
#3
by maximellerbach HF Staff - opened
Files changed (7)
12 unmodified lines1314151617181920212212 unmodified lines## How to Get Started with the ModelUse `python lerobot/scripts/eval.py -p lerobot/diffusion_pusht` to evaluate for 50 episodes with the outputs sent to `outputs/eval`.For further information, please see the [LeRobot library](https://github.com/huggingface/lerobot) (particularly the [evaluation script](https://github.com/huggingface/lerobot/blob/main/lerobot/scripts/eval.py)).## Training DetailsTrained with [LeRobot@cc2f6e7](https://github.com/huggingface/lerobot/tree/cc2f6e74047bd65db0f9705fa602636b625bc28c).12 unmodified lines13141516171819202122232425262728293031323334353637383940414212 unmodified lines## How to Get Started with the ModelRun one evaluation episode with LeRobot's policy processor pipeline.```bashlerobot-eval --policy.path=lerobot/diffusion_pusht_keypoints \--env.type=pusht \--env.obs_type=environment_state_agent_pos \--eval.recording=true \--eval.n_episodes=1 \--eval.batch_size=1```The keypoint-only environment has no RGB observations. On versions that try to save an RGB rollout video by default, `--eval.recording=true` records the rollout as a local dataset instead.For further information, please see the [LeRobot library](https://github.com/huggingface/lerobot) (particularly the [evaluation script](https://github.com/huggingface/lerobot/blob/main/lerobot/scripts/eval.py)).### Legacy LeRobot versionsIf you use LeRobot **0.3.3 or earlier**, pin the model to[`58570fc39828d28efa5457aa297a52be27ac3a10`](https://huggingface.co/lerobot/diffusion_pusht_keypoints/tree/58570fc39828d28efa5457aa297a52be27ac3a10). That revision keepsthe original checkpoint format. Use the LeRobot revision listed in Training Detailsif your installed version cannot load the legacy snapshot.## Training DetailsTrained with [LeRobot@cc2f6e7](https://github.com/huggingface/lerobot/tree/cc2f6e74047bd65db0f9705fa602636b625bc28c).
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253{"beta_end": 0.02,"beta_schedule": "squaredcos_cap_v2","beta_start": 0.0001,"clip_sample": true,"clip_sample_range": 1.0,"crop_is_random": true,"crop_shape": [84,84],"diffusion_step_embed_dim": 128,"do_mask_loss_for_padding": false,"down_dims": [512,1024,2048],"horizon": 16,"input_normalization_modes": {"observation.environment_state": "min_max","observation.state": "min_max"},"input_shapes": {"observation.environment_state": [16],"observation.state": [2]},"kernel_size": 5,"n_action_steps": 8,"n_groups": 8,"n_obs_steps": 2,"noise_scheduler_type": "DDIM","num_inference_steps": 10,"num_train_timesteps": 100,"output_normalization_modes": {"action": "min_max"},"output_shapes": {"action": [2]},"prediction_type": "epsilon","pretrained_backbone_weights": null,"spatial_softmax_num_keypoints": 32,"use_film_scale_modulation": true,"use_group_norm": true,"vision_backbone": "resnet18"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081{"type": "diffusion","n_obs_steps": 2,"input_features": {"observation.environment_state": {"type": "ENV","shape": [16]},"observation.state": {"type": "STATE","shape": [2]}},"output_features": {"action": {"type": "ACTION","shape": [2]}},"device": "cuda","use_amp": false,"push_to_hub": true,"repo_id": null,"private": null,"tags": null,"license": null,"pretrained_path": null,"horizon": 16,"n_action_steps": 8,"normalization_mapping": {"STATE": "MIN_MAX","ACTION": "MIN_MAX","VISUAL": "MEAN_STD","ENV": "MIN_MAX"},"drop_n_last_frames": 7,"vision_backbone": "resnet18","crop_shape": [84,84],"crop_is_random": true,"pretrained_backbone_weights": null,"use_group_norm": true,"spatial_softmax_num_keypoints": 32,"use_separate_rgb_encoder_per_camera": true,"down_dims": [512,1024,2048],"kernel_size": 5,"n_groups": 8,"diffusion_step_embed_dim": 128,"use_film_scale_modulation": true,"noise_scheduler_type": "DDIM","num_train_timesteps": 100,"beta_schedule": "squaredcos_cap_v2","beta_start": 0.0001,"beta_end": 0.02,"prediction_type": "epsilon","clip_sample": true,"clip_sample_range": 1.0,"num_inference_steps": 10,"do_mask_loss_for_padding": false,"optimizer_lr": 0.0001,"optimizer_betas": [0.95,0.999],"optimizer_eps": 1e-08,"optimizer_weight_decay": 1e-06,"scheduler_name": "cosine","scheduler_warmup_steps": 500}
123version https://git-lfs.github.com/spec/v1oid sha256:ae40aa87dd124ee1e4914258049f4eac676345a28e6cb8dfcfa67830cc3246b0size 995056568123version https://git-lfs.github.com/spec/v1oid sha256:ba5dc5fca08ab8a2a6ce1be7ecda15d08b9cfa2e8c2d59206572278b4d45e89dsize 995055528
123456789101112131415161718192021222324252627282930313233{ "name": "policy_postprocessor", "steps": [ { "registry_name": "unnormalizer_processor", "config": { "eps": 1e-08, "features": { "action": { "type": "ACTION", "shape": [ 2 ] } }, "norm_map": { "STATE": "MIN_MAX", "ACTION": "MIN_MAX", "VISUAL": "MEAN_STD", "ENV": "MIN_MAX" } }, "state_file": "policy_postprocessor_step_0_unnormalizer_processor.safetensors" }, { "registry_name": "device_processor", "config": { "device": "cpu", "float_dtype": null } } ]}123version https://git-lfs.github.com/spec/v1oid sha256:44ba691b98a0986d9357d7b7253d204cedff93e879353ac9262815a6e12152aesize 63212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455{ "name": "policy_preprocessor", "steps": [ { "registry_name": "rename_observations_processor", "config": { "rename_map": {} } }, { "registry_name": "to_batch_processor", "config": {} }, { "registry_name": "device_processor", "config": { "device": "cuda", "float_dtype": null } }, { "registry_name": "normalizer_processor", "config": { "eps": 1e-08, "features": { "observation.environment_state": { "type": "ENV", "shape": [ 16 ] }, "observation.state": { "type": "STATE", "shape": [ 2 ] }, "action": { "type": "ACTION", "shape": [ 2 ] } }, "norm_map": { "STATE": "MIN_MAX", "ACTION": "MIN_MAX", "VISUAL": "MEAN_STD", "ENV": "MIN_MAX" } }, "state_file": "policy_preprocessor_step_3_normalizer_processor.safetensors" } ]}123version https://git-lfs.github.com/spec/v1oid sha256:44ba691b98a0986d9357d7b7253d204cedff93e879353ac9262815a6e12152aesize 632README.md+21-1
config.json+66-38
model.safetensors+2-2
policy_postprocessor.jsonAdded+33
policy_postprocessor_step_0_unnormalizer_processor.safetensorsAdded+3
policy_preprocessor.jsonAdded+55
policy_preprocessor_step_3_normalizer_processor.safetensorsAdded+3