Robotics
LeRobot
Safetensors
diffusion
gaspardthrl commited on
Commit
c4eced9
·
verified ·
1 Parent(s): 1a9c6cd

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +116 -0
  3. model.safetensors +3 -0
  4. train_config.json +233 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: gaspardthrl/walleed_hg_double_fold_clean
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - diffusion
9
+ - lerobot
10
+ - robotics
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,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 6
9
+ ]
10
+ },
11
+ "observation.images.front": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ }
19
+ },
20
+ "output_features": {
21
+ "action": {
22
+ "type": "ACTION",
23
+ "shape": [
24
+ 6
25
+ ]
26
+ }
27
+ },
28
+ "device": "cuda",
29
+ "use_amp": false,
30
+ "use_peft": false,
31
+ "push_to_hub": true,
32
+ "repo_id": "gaspardthrl/diffusion-A3-cls",
33
+ "private": null,
34
+ "tags": null,
35
+ "license": null,
36
+ "pretrained_path": null,
37
+ "horizon": 32,
38
+ "n_action_steps": 16,
39
+ "normalization_mapping": {
40
+ "VISUAL": "MEAN_STD",
41
+ "STATE": "MIN_MAX",
42
+ "ACTION": "MEAN_STD"
43
+ },
44
+ "drop_n_last_frames": 16,
45
+ "use_relative_actions": true,
46
+ "relative_exclude_joints": [
47
+ "gripper"
48
+ ],
49
+ "action_feature_names": [
50
+ "shoulder_pan.pos",
51
+ "shoulder_lift.pos",
52
+ "elbow_flex.pos",
53
+ "wrist_flex.pos",
54
+ "wrist_roll.pos",
55
+ "gripper.pos"
56
+ ],
57
+ "proprio_dropout": 0.3,
58
+ "state_indices": null,
59
+ "action_normalization_mode": "MEAN_STD",
60
+ "use_subtask_classifier": true,
61
+ "subtask_classifier_repo": "gaspardthrl/walleed-subtask-cls",
62
+ "subtask_classifier_filename": "dinov2_s/best.pt",
63
+ "subtask_classifier_path": null,
64
+ "subtask_classifier_n_classes": 8,
65
+ "subtask_classifier_image_key": null,
66
+ "subtask_prev_array_path": "./data/meta/prev_subtask.npy",
67
+ "subtask_dataset_state_stats_path": "./data/meta/subtask_state_stats.json",
68
+ "use_eef_actions": false,
69
+ "eef_poses_path": null,
70
+ "eef_stats_path": null,
71
+ "eef_action_dim": 10,
72
+ "vision_backbone": "resnet18",
73
+ "resize_shape": [
74
+ 96,
75
+ 96
76
+ ],
77
+ "crop_ratio": 1.0,
78
+ "crop_shape": null,
79
+ "crop_is_random": true,
80
+ "pretrained_backbone_weights": null,
81
+ "use_group_norm": true,
82
+ "spatial_softmax_num_keypoints": 32,
83
+ "use_separate_rgb_encoder_per_camera": false,
84
+ "image_grayworld": true,
85
+ "image_grayscale": true,
86
+ "down_dims": [
87
+ 512,
88
+ 1024,
89
+ 2048
90
+ ],
91
+ "kernel_size": 5,
92
+ "n_groups": 8,
93
+ "diffusion_step_embed_dim": 128,
94
+ "use_film_scale_modulation": true,
95
+ "noise_scheduler_type": "DDPM",
96
+ "num_train_timesteps": 100,
97
+ "beta_schedule": "squaredcos_cap_v2",
98
+ "beta_start": 0.0001,
99
+ "beta_end": 0.02,
100
+ "prediction_type": "epsilon",
101
+ "clip_sample": true,
102
+ "clip_sample_range": 3.0,
103
+ "num_inference_steps": null,
104
+ "compile_model": false,
105
+ "compile_mode": "reduce-overhead",
106
+ "do_mask_loss_for_padding": false,
107
+ "optimizer_lr": 0.0001,
108
+ "optimizer_betas": [
109
+ 0.95,
110
+ 0.999
111
+ ],
112
+ "optimizer_eps": 1e-08,
113
+ "optimizer_weight_decay": 1e-06,
114
+ "scheduler_name": "cosine",
115
+ "scheduler_warmup_steps": 500
116
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e5c2f4d4ec97a22229a90f49bfdfa21bd26d13afd7beb12d60b617ee1ab8118
3
+ size 1133478552
train_config.json ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "gaspardthrl/walleed_hg_double_fold_clean",
4
+ "root": null,
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": true,
8
+ "max_num_transforms": 4,
9
+ "random_order": true,
10
+ "tfs": {
11
+ "brightness": {
12
+ "weight": 1.0,
13
+ "type": "ColorJitter",
14
+ "kwargs": {
15
+ "brightness": [
16
+ 0.7,
17
+ 1.3
18
+ ]
19
+ }
20
+ },
21
+ "contrast": {
22
+ "weight": 1.0,
23
+ "type": "ColorJitter",
24
+ "kwargs": {
25
+ "contrast": [
26
+ 0.7,
27
+ 1.3
28
+ ]
29
+ }
30
+ },
31
+ "warmth": {
32
+ "weight": 1.0,
33
+ "type": "WarmthJitter",
34
+ "kwargs": {
35
+ "warmth": [
36
+ -0.15,
37
+ 0.15
38
+ ]
39
+ }
40
+ },
41
+ "affine": {
42
+ "weight": 1.0,
43
+ "type": "RandomAffine",
44
+ "kwargs": {
45
+ "degrees": [
46
+ -8,
47
+ 8
48
+ ],
49
+ "translate": [
50
+ 0.12,
51
+ 0.12
52
+ ]
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "revision": null,
58
+ "use_imagenet_stats": true,
59
+ "stats_override_path": "./data/meta/relative_stats.json",
60
+ "video_backend": "pyav",
61
+ "return_uint8": false,
62
+ "streaming": false
63
+ },
64
+ "env": null,
65
+ "policy": {
66
+ "type": "diffusion",
67
+ "n_obs_steps": 1,
68
+ "input_features": {
69
+ "observation.state": {
70
+ "type": "STATE",
71
+ "shape": [
72
+ 6
73
+ ]
74
+ },
75
+ "observation.images.front": {
76
+ "type": "VISUAL",
77
+ "shape": [
78
+ 3,
79
+ 480,
80
+ 640
81
+ ]
82
+ }
83
+ },
84
+ "output_features": {
85
+ "action": {
86
+ "type": "ACTION",
87
+ "shape": [
88
+ 6
89
+ ]
90
+ }
91
+ },
92
+ "device": "cuda",
93
+ "use_amp": false,
94
+ "use_peft": false,
95
+ "push_to_hub": true,
96
+ "repo_id": "gaspardthrl/diffusion-A3-cls",
97
+ "private": null,
98
+ "tags": null,
99
+ "license": null,
100
+ "pretrained_path": null,
101
+ "horizon": 32,
102
+ "n_action_steps": 16,
103
+ "normalization_mapping": {
104
+ "VISUAL": "MEAN_STD",
105
+ "STATE": "MIN_MAX",
106
+ "ACTION": "MEAN_STD"
107
+ },
108
+ "drop_n_last_frames": 16,
109
+ "use_relative_actions": true,
110
+ "relative_exclude_joints": [
111
+ "gripper"
112
+ ],
113
+ "action_feature_names": [
114
+ "shoulder_pan.pos",
115
+ "shoulder_lift.pos",
116
+ "elbow_flex.pos",
117
+ "wrist_flex.pos",
118
+ "wrist_roll.pos",
119
+ "gripper.pos"
120
+ ],
121
+ "proprio_dropout": 0.3,
122
+ "state_indices": null,
123
+ "action_normalization_mode": "MEAN_STD",
124
+ "use_subtask_classifier": true,
125
+ "subtask_classifier_repo": "gaspardthrl/walleed-subtask-cls",
126
+ "subtask_classifier_filename": "dinov2_s/best.pt",
127
+ "subtask_classifier_path": null,
128
+ "subtask_classifier_n_classes": 8,
129
+ "subtask_classifier_image_key": null,
130
+ "subtask_prev_array_path": "./data/meta/prev_subtask.npy",
131
+ "subtask_dataset_state_stats_path": "./data/meta/subtask_state_stats.json",
132
+ "use_eef_actions": false,
133
+ "eef_poses_path": null,
134
+ "eef_stats_path": null,
135
+ "eef_action_dim": 10,
136
+ "vision_backbone": "resnet18",
137
+ "resize_shape": [
138
+ 96,
139
+ 96
140
+ ],
141
+ "crop_ratio": 1.0,
142
+ "crop_shape": null,
143
+ "crop_is_random": true,
144
+ "pretrained_backbone_weights": null,
145
+ "use_group_norm": true,
146
+ "spatial_softmax_num_keypoints": 32,
147
+ "use_separate_rgb_encoder_per_camera": false,
148
+ "image_grayworld": true,
149
+ "image_grayscale": true,
150
+ "down_dims": [
151
+ 512,
152
+ 1024,
153
+ 2048
154
+ ],
155
+ "kernel_size": 5,
156
+ "n_groups": 8,
157
+ "diffusion_step_embed_dim": 128,
158
+ "use_film_scale_modulation": true,
159
+ "noise_scheduler_type": "DDPM",
160
+ "num_train_timesteps": 100,
161
+ "beta_schedule": "squaredcos_cap_v2",
162
+ "beta_start": 0.0001,
163
+ "beta_end": 0.02,
164
+ "prediction_type": "epsilon",
165
+ "clip_sample": true,
166
+ "clip_sample_range": 3.0,
167
+ "num_inference_steps": null,
168
+ "compile_model": false,
169
+ "compile_mode": "reduce-overhead",
170
+ "do_mask_loss_for_padding": false,
171
+ "optimizer_lr": 0.0001,
172
+ "optimizer_betas": [
173
+ 0.95,
174
+ 0.999
175
+ ],
176
+ "optimizer_eps": 1e-08,
177
+ "optimizer_weight_decay": 1e-06,
178
+ "scheduler_name": "cosine",
179
+ "scheduler_warmup_steps": 500
180
+ },
181
+ "reward_model": null,
182
+ "output_dir": "outputs/diffusion_A3_20260519_065341",
183
+ "job_name": "diffusion-A3-proprio-dropout",
184
+ "resume": false,
185
+ "seed": 1000,
186
+ "cudnn_deterministic": false,
187
+ "num_workers": 8,
188
+ "batch_size": 128,
189
+ "prefetch_factor": 4,
190
+ "persistent_workers": true,
191
+ "steps": 100000,
192
+ "eval_freq": 20000,
193
+ "log_freq": 200,
194
+ "tolerance_s": 0.0001,
195
+ "save_checkpoint": true,
196
+ "save_freq": 20000,
197
+ "use_policy_training_preset": true,
198
+ "optimizer": {
199
+ "type": "adam",
200
+ "lr": 0.0001,
201
+ "weight_decay": 1e-06,
202
+ "grad_clip_norm": 10.0,
203
+ "betas": [
204
+ 0.95,
205
+ 0.999
206
+ ],
207
+ "eps": 1e-08
208
+ },
209
+ "scheduler": {
210
+ "type": "diffuser",
211
+ "num_warmup_steps": 500,
212
+ "name": "cosine"
213
+ },
214
+ "eval": {
215
+ "n_episodes": 50,
216
+ "batch_size": 8,
217
+ "use_async_envs": true
218
+ },
219
+ "wandb": {
220
+ "enable": true,
221
+ "disable_artifact": false,
222
+ "project": "diffusing",
223
+ "entity": null,
224
+ "notes": "A3 proprio dropout p=0.3, relative actions, MEAN_STD action norm, ResNet-18, 100000 steps",
225
+ "run_id": "q9tfbb3o",
226
+ "mode": null,
227
+ "add_tags": true
228
+ },
229
+ "peft": null,
230
+ "sample_weighting": null,
231
+ "rename_map": {},
232
+ "checkpoint_path": null
233
+ }