ngagahf commited on
Commit
7eaee6e
·
verified ·
1 Parent(s): fc510bd

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +83 -0
  3. model.safetensors +3 -0
  4. train_config.json +258 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: lerobot/pusht_image
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - robotics
9
+ - diffusion
10
+ - lerobot
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,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ },
20
+ "output_features": {
21
+ "action": {
22
+ "type": "ACTION",
23
+ "shape": [
24
+ 2
25
+ ]
26
+ }
27
+ },
28
+ "device": "mps",
29
+ "use_amp": false,
30
+ "use_peft": false,
31
+ "push_to_hub": true,
32
+ "repo_id": "ngagahf/pusht_diffusion_5k",
33
+ "private": false,
34
+ "tags": null,
35
+ "license": null,
36
+ "pretrained_path": "outputs/train/pusht_diffusion_5k/checkpoints/last/pretrained_model",
37
+ "horizon": 16,
38
+ "n_action_steps": 8,
39
+ "normalization_mapping": {
40
+ "VISUAL": "MEAN_STD",
41
+ "STATE": "MIN_MAX",
42
+ "ACTION": "MIN_MAX"
43
+ },
44
+ "drop_n_last_frames": 7,
45
+ "vision_backbone": "resnet18",
46
+ "crop_shape": [
47
+ 84,
48
+ 84
49
+ ],
50
+ "crop_is_random": true,
51
+ "pretrained_backbone_weights": null,
52
+ "use_group_norm": true,
53
+ "spatial_softmax_num_keypoints": 32,
54
+ "use_separate_rgb_encoder_per_camera": false,
55
+ "down_dims": [
56
+ 512,
57
+ 1024,
58
+ 2048
59
+ ],
60
+ "kernel_size": 5,
61
+ "n_groups": 8,
62
+ "diffusion_step_embed_dim": 128,
63
+ "use_film_scale_modulation": true,
64
+ "noise_scheduler_type": "DDPM",
65
+ "num_train_timesteps": 100,
66
+ "beta_schedule": "squaredcos_cap_v2",
67
+ "beta_start": 0.0001,
68
+ "beta_end": 0.02,
69
+ "prediction_type": "epsilon",
70
+ "clip_sample": true,
71
+ "clip_sample_range": 1.0,
72
+ "num_inference_steps": null,
73
+ "do_mask_loss_for_padding": false,
74
+ "optimizer_lr": 0.0001,
75
+ "optimizer_betas": [
76
+ 0.95,
77
+ 0.999
78
+ ],
79
+ "optimizer_eps": 1e-08,
80
+ "optimizer_weight_decay": 1e-06,
81
+ "scheduler_name": "cosine",
82
+ "scheduler_warmup_steps": 500
83
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d640a1577a5c0b4e7b28b89b6641885ff176b4ff8e99e7a8b51d465650c828e
3
+ size 1050861448
train_config.json ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "lerobot/pusht_image",
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
+ "affine": {
62
+ "weight": 1.0,
63
+ "type": "RandomAffine",
64
+ "kwargs": {
65
+ "degrees": [
66
+ -5.0,
67
+ 5.0
68
+ ],
69
+ "translate": [
70
+ 0.05,
71
+ 0.05
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "revision": null,
78
+ "use_imagenet_stats": true,
79
+ "video_backend": "torchcodec",
80
+ "streaming": false
81
+ },
82
+ "env": {
83
+ "type": "pusht",
84
+ "task": "PushT-v0",
85
+ "fps": 10,
86
+ "features": {
87
+ "action": {
88
+ "type": "ACTION",
89
+ "shape": [
90
+ 2
91
+ ]
92
+ },
93
+ "agent_pos": {
94
+ "type": "STATE",
95
+ "shape": [
96
+ 2
97
+ ]
98
+ },
99
+ "pixels": {
100
+ "type": "VISUAL",
101
+ "shape": [
102
+ 384,
103
+ 384,
104
+ 3
105
+ ]
106
+ }
107
+ },
108
+ "features_map": {
109
+ "action": "action",
110
+ "agent_pos": "observation.state",
111
+ "environment_state": "observation.environment_state",
112
+ "pixels": "observation.image"
113
+ },
114
+ "max_parallel_tasks": 1,
115
+ "disable_env_checker": true,
116
+ "episode_length": 300,
117
+ "obs_type": "pixels_agent_pos",
118
+ "render_mode": "rgb_array",
119
+ "visualization_width": 384,
120
+ "visualization_height": 384,
121
+ "observation_height": 384,
122
+ "observation_width": 384
123
+ },
124
+ "policy": {
125
+ "type": "diffusion",
126
+ "n_obs_steps": 2,
127
+ "input_features": {
128
+ "observation.image": {
129
+ "type": "VISUAL",
130
+ "shape": [
131
+ 3,
132
+ 96,
133
+ 96
134
+ ]
135
+ },
136
+ "observation.state": {
137
+ "type": "STATE",
138
+ "shape": [
139
+ 2
140
+ ]
141
+ }
142
+ },
143
+ "output_features": {
144
+ "action": {
145
+ "type": "ACTION",
146
+ "shape": [
147
+ 2
148
+ ]
149
+ }
150
+ },
151
+ "device": "mps",
152
+ "use_amp": false,
153
+ "use_peft": false,
154
+ "push_to_hub": true,
155
+ "repo_id": "ngagahf/pusht_diffusion_5k",
156
+ "private": false,
157
+ "tags": null,
158
+ "license": null,
159
+ "pretrained_path": "outputs/train/pusht_diffusion_5k/checkpoints/last/pretrained_model",
160
+ "horizon": 16,
161
+ "n_action_steps": 8,
162
+ "normalization_mapping": {
163
+ "VISUAL": "MEAN_STD",
164
+ "STATE": "MIN_MAX",
165
+ "ACTION": "MIN_MAX"
166
+ },
167
+ "drop_n_last_frames": 7,
168
+ "vision_backbone": "resnet18",
169
+ "crop_shape": [
170
+ 84,
171
+ 84
172
+ ],
173
+ "crop_is_random": true,
174
+ "pretrained_backbone_weights": null,
175
+ "use_group_norm": true,
176
+ "spatial_softmax_num_keypoints": 32,
177
+ "use_separate_rgb_encoder_per_camera": false,
178
+ "down_dims": [
179
+ 512,
180
+ 1024,
181
+ 2048
182
+ ],
183
+ "kernel_size": 5,
184
+ "n_groups": 8,
185
+ "diffusion_step_embed_dim": 128,
186
+ "use_film_scale_modulation": true,
187
+ "noise_scheduler_type": "DDPM",
188
+ "num_train_timesteps": 100,
189
+ "beta_schedule": "squaredcos_cap_v2",
190
+ "beta_start": 0.0001,
191
+ "beta_end": 0.02,
192
+ "prediction_type": "epsilon",
193
+ "clip_sample": true,
194
+ "clip_sample_range": 1.0,
195
+ "num_inference_steps": null,
196
+ "do_mask_loss_for_padding": false,
197
+ "optimizer_lr": 0.0001,
198
+ "optimizer_betas": [
199
+ 0.95,
200
+ 0.999
201
+ ],
202
+ "optimizer_eps": 1e-08,
203
+ "optimizer_weight_decay": 1e-06,
204
+ "scheduler_name": "cosine",
205
+ "scheduler_warmup_steps": 500
206
+ },
207
+ "output_dir": "outputs/train/pusht_diffusion_5k",
208
+ "job_name": "pusht_diffusion_second_try",
209
+ "resume": true,
210
+ "seed": 1000,
211
+ "num_workers": 4,
212
+ "batch_size": 32,
213
+ "steps": 5000,
214
+ "eval_freq": 20000,
215
+ "log_freq": 200,
216
+ "tolerance_s": 0.0001,
217
+ "save_checkpoint": true,
218
+ "save_freq": 20000,
219
+ "use_policy_training_preset": true,
220
+ "optimizer": {
221
+ "type": "adam",
222
+ "lr": 0.0001,
223
+ "weight_decay": 1e-06,
224
+ "grad_clip_norm": 10.0,
225
+ "betas": [
226
+ 0.95,
227
+ 0.999
228
+ ],
229
+ "eps": 1e-08
230
+ },
231
+ "scheduler": {
232
+ "type": "diffuser",
233
+ "num_warmup_steps": 500,
234
+ "name": "cosine"
235
+ },
236
+ "eval": {
237
+ "n_episodes": 50,
238
+ "batch_size": 50,
239
+ "use_async_envs": false
240
+ },
241
+ "wandb": {
242
+ "enable": false,
243
+ "disable_artifact": false,
244
+ "project": "lerobot",
245
+ "entity": null,
246
+ "notes": null,
247
+ "run_id": null,
248
+ "mode": null
249
+ },
250
+ "peft": null,
251
+ "use_rabc": false,
252
+ "rabc_progress_path": null,
253
+ "rabc_kappa": 0.01,
254
+ "rabc_epsilon": 1e-06,
255
+ "rabc_head_mode": "sparse",
256
+ "rename_map": {},
257
+ "checkpoint_path": "outputs/train/pusht_diffusion_5k/checkpoints/last"
258
+ }