Robotics
LeRobot
Safetensors
diffusion
the-future-dev commited on
Commit
14045a8
·
verified ·
1 Parent(s): c7de0ec

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +93 -0
  3. model.safetensors +3 -0
  4. train_config.json +242 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: the-future-dev/pusht_image_keypoints
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - robotics
9
+ - lerobot
10
+ - diffusion
11
+ ---
12
+
13
+ # Model Card for diffusion
14
+
15
+ <!-- Provide a quick summary of what the model is/does. -->
16
+
17
+
18
+ [Diffusion Policy](https://huggingface.co/papers/2303.04137) treats visuomotor control as a generative diffusion process, producing smooth, multi-step action trajectories that excel at contact-rich manipulation.
19
+
20
+
21
+ This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
22
+ See the full documentation at [LeRobot Docs](https://huggingface.co/docs/lerobot/index).
23
+
24
+ ---
25
+
26
+ ## How to Get Started with the Model
27
+
28
+ For a complete walkthrough, see the [training guide](https://huggingface.co/docs/lerobot/il_robots#train-a-policy).
29
+ Below is the short version on how to train and run inference/eval:
30
+
31
+ ### Train from scratch
32
+
33
+ ```bash
34
+ lerobot-train \
35
+ --dataset.repo_id=${HF_USER}/<dataset> \
36
+ --policy.type=act \
37
+ --output_dir=outputs/train/<desired_policy_repo_id> \
38
+ --job_name=lerobot_training \
39
+ --policy.device=cuda \
40
+ --policy.repo_id=${HF_USER}/<desired_policy_repo_id>
41
+ --wandb.enable=true
42
+ ```
43
+
44
+ _Writes checkpoints to `outputs/train/<desired_policy_repo_id>/checkpoints/`._
45
+
46
+ ### Evaluate the policy/run inference
47
+
48
+ ```bash
49
+ lerobot-record \
50
+ --robot.type=so100_follower \
51
+ --dataset.repo_id=<hf_user>/eval_<dataset> \
52
+ --policy.path=<hf_user>/<desired_policy_repo_id> \
53
+ --episodes=10
54
+ ```
55
+
56
+ Prefix the dataset repo with **eval\_** and supply `--policy.path` pointing to a local or hub checkpoint.
57
+
58
+ ---
59
+
60
+ ## Model Details
61
+
62
+ - **License:** apache-2.0
config.json ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "input_features": {
5
+ "observation.image": {
6
+ "type": "VISUAL",
7
+ "shape": [
8
+ 3,
9
+ 96,
10
+ 96
11
+ ]
12
+ },
13
+ "observation.state": {
14
+ "type": "STATE",
15
+ "shape": [
16
+ 2
17
+ ]
18
+ },
19
+ "observation.environment_state": {
20
+ "type": "ENV",
21
+ "shape": [
22
+ 16
23
+ ]
24
+ }
25
+ },
26
+ "output_features": {
27
+ "action": {
28
+ "type": "ACTION",
29
+ "shape": [
30
+ 2
31
+ ]
32
+ }
33
+ },
34
+ "device": "cuda",
35
+ "use_amp": false,
36
+ "push_to_hub": true,
37
+ "repo_id": "the-future-dev/pusht_diffusion_lowdim",
38
+ "private": null,
39
+ "tags": null,
40
+ "license": null,
41
+ "pretrained_path": null,
42
+ "horizon": 16,
43
+ "n_action_steps": 8,
44
+ "normalization_mapping": {
45
+ "STATE": "MIN_MAX",
46
+ "ENV": "MIN_MAX",
47
+ "ACTION": "MIN_MAX"
48
+ },
49
+ "drop_n_last_frames": 7,
50
+ "vision_backbone": null,
51
+ "crop_shape": null,
52
+ "crop_is_random": false,
53
+ "pretrained_backbone_weights": null,
54
+ "use_group_norm": true,
55
+ "spatial_softmax_num_keypoints": 32,
56
+ "use_separate_rgb_encoder_per_camera": false,
57
+ "state_encoder": "mlp",
58
+ "state_encoder_out_dim": 64,
59
+ "down_dims": [
60
+ 512,
61
+ 1024,
62
+ 2048
63
+ ],
64
+ "kernel_size": 5,
65
+ "n_groups": 8,
66
+ "diffusion_step_embed_dim": 128,
67
+ "use_film_scale_modulation": true,
68
+ "noise_scheduler_type": "DDPM",
69
+ "num_train_timesteps": 100,
70
+ "beta_schedule": "squaredcos_cap_v2",
71
+ "beta_start": 0.0001,
72
+ "beta_end": 0.02,
73
+ "prediction_type": "epsilon",
74
+ "clip_sample": true,
75
+ "clip_sample_range": 1.0,
76
+ "num_inference_steps": null,
77
+ "do_mask_loss_for_padding": false,
78
+ "optimizer_lr": 0.0001,
79
+ "optimizer_betas": [
80
+ 0.95,
81
+ 0.999
82
+ ],
83
+ "optimizer_eps": 1e-08,
84
+ "optimizer_weight_decay": 1e-06,
85
+ "scheduler_name": "cosine",
86
+ "scheduler_warmup_steps": 1000,
87
+ "privileged": null,
88
+ "add_rgb_prediction_head": false,
89
+ "priv_encoder_output_shape": 0,
90
+ "rgb_encoder_checkpoint": null,
91
+ "pretrained_unet_path": null,
92
+ "pretrained_state_encoder_path": null
93
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5313154250e0c87fa4ecb66463c45d87e83959e634b2f2d096762e3ab01a2339
3
+ size 1006107672
train_config.json ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "the-future-dev/pusht_image_keypoints",
4
+ "root": null,
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": false,
8
+ "max_num_transforms": 3,
9
+ "random_order": false,
10
+ "tfs": {
11
+ "brightness": {
12
+ "weight": 1.0,
13
+ "type": "ColorJitter",
14
+ "kwargs": {
15
+ "brightness": [
16
+ 0.8,
17
+ 1.2
18
+ ]
19
+ }
20
+ },
21
+ "contrast": {
22
+ "weight": 1.0,
23
+ "type": "ColorJitter",
24
+ "kwargs": {
25
+ "contrast": [
26
+ 0.8,
27
+ 1.2
28
+ ]
29
+ }
30
+ },
31
+ "saturation": {
32
+ "weight": 1.0,
33
+ "type": "ColorJitter",
34
+ "kwargs": {
35
+ "saturation": [
36
+ 0.5,
37
+ 1.5
38
+ ]
39
+ }
40
+ },
41
+ "hue": {
42
+ "weight": 1.0,
43
+ "type": "ColorJitter",
44
+ "kwargs": {
45
+ "hue": [
46
+ -0.05,
47
+ 0.05
48
+ ]
49
+ }
50
+ },
51
+ "sharpness": {
52
+ "weight": 1.0,
53
+ "type": "SharpnessJitter",
54
+ "kwargs": {
55
+ "sharpness": [
56
+ 0.5,
57
+ 1.5
58
+ ]
59
+ }
60
+ }
61
+ }
62
+ },
63
+ "revision": null,
64
+ "use_imagenet_stats": false,
65
+ "video_backend": "pyav",
66
+ "streaming": false
67
+ },
68
+ "env": {
69
+ "type": "pusht",
70
+ "task": "PushT-v0",
71
+ "fps": 10,
72
+ "features": {
73
+ "action": {
74
+ "type": "ACTION",
75
+ "shape": [
76
+ 2
77
+ ]
78
+ },
79
+ "agent_pos": {
80
+ "type": "STATE",
81
+ "shape": [
82
+ 2
83
+ ]
84
+ },
85
+ "environment_state": {
86
+ "type": "ENV",
87
+ "shape": [
88
+ 16
89
+ ]
90
+ }
91
+ },
92
+ "features_map": {
93
+ "action": "action",
94
+ "agent_pos": "observation.state",
95
+ "environment_state": "observation.environment_state"
96
+ },
97
+ "max_parallel_tasks": 1,
98
+ "disable_env_checker": true,
99
+ "episode_length": 300,
100
+ "obs_type": "environment_state_agent_pos",
101
+ "render_mode": "rgb_array",
102
+ "visualization_width": 384,
103
+ "visualization_height": 384,
104
+ "observation_height": 384,
105
+ "observation_width": 384
106
+ },
107
+ "policy": {
108
+ "type": "diffusion",
109
+ "n_obs_steps": 2,
110
+ "input_features": {
111
+ "observation.image": {
112
+ "type": "VISUAL",
113
+ "shape": [
114
+ 3,
115
+ 96,
116
+ 96
117
+ ]
118
+ },
119
+ "observation.state": {
120
+ "type": "STATE",
121
+ "shape": [
122
+ 2
123
+ ]
124
+ },
125
+ "observation.environment_state": {
126
+ "type": "ENV",
127
+ "shape": [
128
+ 16
129
+ ]
130
+ }
131
+ },
132
+ "output_features": {
133
+ "action": {
134
+ "type": "ACTION",
135
+ "shape": [
136
+ 2
137
+ ]
138
+ }
139
+ },
140
+ "device": "cuda",
141
+ "use_amp": false,
142
+ "push_to_hub": true,
143
+ "repo_id": "the-future-dev/pusht_diffusion_lowdim",
144
+ "private": null,
145
+ "tags": null,
146
+ "license": null,
147
+ "pretrained_path": null,
148
+ "horizon": 16,
149
+ "n_action_steps": 8,
150
+ "normalization_mapping": {
151
+ "STATE": "MIN_MAX",
152
+ "ENV": "MIN_MAX",
153
+ "ACTION": "MIN_MAX"
154
+ },
155
+ "drop_n_last_frames": 7,
156
+ "vision_backbone": null,
157
+ "crop_shape": null,
158
+ "crop_is_random": false,
159
+ "pretrained_backbone_weights": null,
160
+ "use_group_norm": true,
161
+ "spatial_softmax_num_keypoints": 32,
162
+ "use_separate_rgb_encoder_per_camera": false,
163
+ "state_encoder": "mlp",
164
+ "state_encoder_out_dim": 64,
165
+ "down_dims": [
166
+ 512,
167
+ 1024,
168
+ 2048
169
+ ],
170
+ "kernel_size": 5,
171
+ "n_groups": 8,
172
+ "diffusion_step_embed_dim": 128,
173
+ "use_film_scale_modulation": true,
174
+ "noise_scheduler_type": "DDPM",
175
+ "num_train_timesteps": 100,
176
+ "beta_schedule": "squaredcos_cap_v2",
177
+ "beta_start": 0.0001,
178
+ "beta_end": 0.02,
179
+ "prediction_type": "epsilon",
180
+ "clip_sample": true,
181
+ "clip_sample_range": 1.0,
182
+ "num_inference_steps": null,
183
+ "do_mask_loss_for_padding": false,
184
+ "optimizer_lr": 0.0001,
185
+ "optimizer_betas": [
186
+ 0.95,
187
+ 0.999
188
+ ],
189
+ "optimizer_eps": 1e-08,
190
+ "optimizer_weight_decay": 1e-06,
191
+ "scheduler_name": "cosine",
192
+ "scheduler_warmup_steps": 1000,
193
+ "privileged": null,
194
+ "add_rgb_prediction_head": false,
195
+ "priv_encoder_output_shape": 0,
196
+ "rgb_encoder_checkpoint": null,
197
+ "pretrained_unet_path": null,
198
+ "pretrained_state_encoder_path": null
199
+ },
200
+ "output_dir": "outputs/train/pusht_diffusion_lowdim",
201
+ "job_name": "pusht_diffusion_lowdim",
202
+ "resume": false,
203
+ "seed": 100000,
204
+ "num_workers": 6,
205
+ "batch_size": 256,
206
+ "steps": 300,
207
+ "eval_freq": 200,
208
+ "log_freq": 200,
209
+ "save_checkpoint": true,
210
+ "save_freq": 25000,
211
+ "use_policy_training_preset": true,
212
+ "optimizer": {
213
+ "type": "adam",
214
+ "lr": 0.0001,
215
+ "weight_decay": 1e-06,
216
+ "grad_clip_norm": 10.0,
217
+ "betas": [
218
+ 0.95,
219
+ 0.999
220
+ ],
221
+ "eps": 1e-08
222
+ },
223
+ "scheduler": {
224
+ "type": "diffuser",
225
+ "num_warmup_steps": 1000,
226
+ "name": "cosine"
227
+ },
228
+ "eval": {
229
+ "n_episodes": 50,
230
+ "batch_size": 50,
231
+ "use_async_envs": false
232
+ },
233
+ "wandb": {
234
+ "enable": true,
235
+ "disable_artifact": false,
236
+ "project": "lerobot-pusht",
237
+ "entity": "fiatlux",
238
+ "notes": null,
239
+ "run_id": "mk33ifxy",
240
+ "mode": null
241
+ }
242
+ }