Robotics
LeRobot
Safetensors
Piper
diffusion-policy
imitation-learning
RoboticsCollectiveAachen commited on
Commit
bd6ff9e
·
verified ·
1 Parent(s): cd01863

Diffusion policy, step 100000

Browse files
README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: lerobot
3
+ tags: [lerobot, robotics, diffusion-policy, piper]
4
+ datasets: [Samisaliveagain/piper-hexagonal-bolt-insertion-100-demos-v1]
5
+ ---
6
+ # Diffusion Policy: Piper hexagonal bolt insertion
7
+
8
+ LeRobot Diffusion Policy trained on [`Samisaliveagain/piper-hexagonal-bolt-insertion-100-demos-v1`](https://huggingface.co/datasets/Samisaliveagain/piper-hexagonal-bolt-insertion-100-demos-v1)
9
+ (100 teleoperated demos, AgileX Piper, cameras `overhead` and `angled`, 7-D absolute joint-position actions).
10
+
11
+ - 100k steps, batch 32 (~30 epochs), fp32, Quadro RTX 6000
12
+ - Images resized to 240x320, no crop; ResNet-18 (ImageNet init), separate encoder per camera
13
+ - n_obs_steps 2, horizon 64, n_action_steps 32; DDIM with 10 inference steps
14
+ - Inference: ~1.2 GB VRAM, ~110 ms per action chunk on an RTX 6000
15
+
16
+ ```python
17
+ from lerobot.policies.diffusion.modeling_diffusion import DiffusionPolicy
18
+ policy = DiffusionPolicy.from_pretrained("RoboticsCollectiveAachen/diffusion_piper_hex_bolt_insertion")
19
+ ```
config.json ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 7
9
+ ]
10
+ },
11
+ "observation.images.overhead": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ },
19
+ "observation.images.angled": {
20
+ "type": "VISUAL",
21
+ "shape": [
22
+ 3,
23
+ 480,
24
+ 640
25
+ ]
26
+ }
27
+ },
28
+ "output_features": {
29
+ "action": {
30
+ "type": "ACTION",
31
+ "shape": [
32
+ 7
33
+ ]
34
+ }
35
+ },
36
+ "device": "cuda",
37
+ "dtype": null,
38
+ "use_amp": false,
39
+ "use_peft": false,
40
+ "push_to_hub": false,
41
+ "repo_id": null,
42
+ "private": null,
43
+ "tags": null,
44
+ "license": null,
45
+ "pretrained_path": null,
46
+ "pretrained_revision": null,
47
+ "horizon": 64,
48
+ "n_action_steps": 32,
49
+ "normalization_mapping": {
50
+ "VISUAL": "MEAN_STD",
51
+ "STATE": "MIN_MAX",
52
+ "ACTION": "MIN_MAX"
53
+ },
54
+ "drop_n_last_frames": 7,
55
+ "vision_backbone": "resnet18",
56
+ "resize_shape": [
57
+ 240,
58
+ 320
59
+ ],
60
+ "crop_ratio": 1.0,
61
+ "crop_shape": null,
62
+ "crop_is_random": true,
63
+ "pretrained_backbone_weights": "ResNet18_Weights.IMAGENET1K_V1",
64
+ "use_group_norm": false,
65
+ "spatial_softmax_num_keypoints": 32,
66
+ "use_separate_rgb_encoder_per_camera": true,
67
+ "down_dims": [
68
+ 512,
69
+ 1024,
70
+ 2048
71
+ ],
72
+ "kernel_size": 5,
73
+ "n_groups": 8,
74
+ "diffusion_step_embed_dim": 128,
75
+ "use_film_scale_modulation": true,
76
+ "gradient_checkpointing": false,
77
+ "noise_scheduler_type": "DDIM",
78
+ "num_train_timesteps": 100,
79
+ "beta_schedule": "squaredcos_cap_v2",
80
+ "beta_start": 0.0001,
81
+ "beta_end": 0.02,
82
+ "prediction_type": "epsilon",
83
+ "clip_sample": true,
84
+ "clip_sample_range": 1.0,
85
+ "num_inference_steps": 10,
86
+ "compile_model": false,
87
+ "compile_mode": "reduce-overhead",
88
+ "do_mask_loss_for_padding": false,
89
+ "optimizer_lr": 0.0001,
90
+ "optimizer_betas": [
91
+ 0.95,
92
+ 0.999
93
+ ],
94
+ "optimizer_eps": 1e-08,
95
+ "optimizer_weight_decay": 1e-06,
96
+ "scheduler_name": "cosine",
97
+ "scheduler_warmup_steps": 500
98
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd6b4f9a7caacf464e96d4a9ee2c43e3750b2722dc9d0438fca19505c27f7973
3
+ size 1111648828
policy_postprocessor.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_postprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "unnormalizer_processor",
6
+ "config": {
7
+ "eps": 1e-08,
8
+ "features": {
9
+ "action": {
10
+ "type": "ACTION",
11
+ "shape": [
12
+ 7
13
+ ]
14
+ }
15
+ },
16
+ "norm_map": {
17
+ "VISUAL": "MEAN_STD",
18
+ "STATE": "MIN_MAX",
19
+ "ACTION": "MIN_MAX"
20
+ }
21
+ },
22
+ "state_file": "policy_postprocessor_step_0_unnormalizer_processor.safetensors"
23
+ },
24
+ {
25
+ "registry_name": "device_processor",
26
+ "config": {
27
+ "device": "cpu",
28
+ "float_dtype": null
29
+ }
30
+ }
31
+ ]
32
+ }
policy_postprocessor_step_0_unnormalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:318335201cb946f824d23d0ec13c9988e41ac67e02a9a3afa86a7a4bcbc567a0
3
+ size 7664
policy_preprocessor.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "policy_preprocessor",
3
+ "steps": [
4
+ {
5
+ "registry_name": "rename_observations_processor",
6
+ "config": {
7
+ "rename_map": {}
8
+ }
9
+ },
10
+ {
11
+ "registry_name": "to_batch_processor",
12
+ "config": {}
13
+ },
14
+ {
15
+ "registry_name": "device_processor",
16
+ "config": {
17
+ "device": "cuda",
18
+ "float_dtype": null
19
+ }
20
+ },
21
+ {
22
+ "registry_name": "normalizer_processor",
23
+ "config": {
24
+ "eps": 1e-08,
25
+ "features": {
26
+ "observation.state": {
27
+ "type": "STATE",
28
+ "shape": [
29
+ 7
30
+ ]
31
+ },
32
+ "observation.images.overhead": {
33
+ "type": "VISUAL",
34
+ "shape": [
35
+ 3,
36
+ 480,
37
+ 640
38
+ ]
39
+ },
40
+ "observation.images.angled": {
41
+ "type": "VISUAL",
42
+ "shape": [
43
+ 3,
44
+ 480,
45
+ 640
46
+ ]
47
+ },
48
+ "action": {
49
+ "type": "ACTION",
50
+ "shape": [
51
+ 7
52
+ ]
53
+ }
54
+ },
55
+ "norm_map": {
56
+ "VISUAL": "MEAN_STD",
57
+ "STATE": "MIN_MAX",
58
+ "ACTION": "MIN_MAX"
59
+ }
60
+ },
61
+ "state_file": "policy_preprocessor_step_3_normalizer_processor.safetensors"
62
+ }
63
+ ]
64
+ }
policy_preprocessor_step_3_normalizer_processor.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d78ee367c41583c1a76fcb420d4bf7d1b9cc6f1b4ac82e23717bed8910f5f4c6
3
+ size 7672
train_config.json ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "Samisaliveagain/piper-hexagonal-bolt-insertion-100-demos-v1",
4
+ "repo_type": "dataset",
5
+ "root": null,
6
+ "episodes": null,
7
+ "exclude_episodes": null,
8
+ "image_transforms": {
9
+ "enable": false,
10
+ "backend": "dataloader",
11
+ "gpu_compile": true,
12
+ "gpu_chunk_size": 32,
13
+ "max_num_transforms": 3,
14
+ "random_order": false,
15
+ "tfs": {
16
+ "brightness": {
17
+ "weight": 1.0,
18
+ "type": "ColorJitter",
19
+ "kwargs": {
20
+ "brightness": [
21
+ 0.8,
22
+ 1.2
23
+ ]
24
+ }
25
+ },
26
+ "contrast": {
27
+ "weight": 1.0,
28
+ "type": "ColorJitter",
29
+ "kwargs": {
30
+ "contrast": [
31
+ 0.8,
32
+ 1.2
33
+ ]
34
+ }
35
+ },
36
+ "saturation": {
37
+ "weight": 1.0,
38
+ "type": "ColorJitter",
39
+ "kwargs": {
40
+ "saturation": [
41
+ 0.5,
42
+ 1.5
43
+ ]
44
+ }
45
+ },
46
+ "hue": {
47
+ "weight": 1.0,
48
+ "type": "ColorJitter",
49
+ "kwargs": {
50
+ "hue": [
51
+ -0.05,
52
+ 0.05
53
+ ]
54
+ }
55
+ },
56
+ "sharpness": {
57
+ "weight": 1.0,
58
+ "type": "SharpnessJitter",
59
+ "kwargs": {
60
+ "sharpness": [
61
+ 0.5,
62
+ 1.5
63
+ ]
64
+ }
65
+ },
66
+ "affine": {
67
+ "weight": 1.0,
68
+ "type": "RandomAffine",
69
+ "kwargs": {
70
+ "degrees": [
71
+ -5.0,
72
+ 5.0
73
+ ],
74
+ "translate": [
75
+ 0.05,
76
+ 0.05
77
+ ]
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "revision": null,
83
+ "use_imagenet_stats": true,
84
+ "video_backend": "torchcodec",
85
+ "return_uint8": false,
86
+ "depth_output_unit": "mm",
87
+ "streaming": false,
88
+ "streaming_episode_pool_size": null,
89
+ "streaming_sampling_strategy": "remaining",
90
+ "streaming_prefetch_episodes": 8,
91
+ "streaming_byte_budget_gb": 8.0,
92
+ "streaming_decode_threads": 2,
93
+ "streaming_decoded_queue_size": 8,
94
+ "streaming_native_http_connections": null,
95
+ "streaming_native_http_subranges": 1,
96
+ "video_decoder_cache_size": null,
97
+ "eval_split": 0.0
98
+ },
99
+ "env": null,
100
+ "policy": {
101
+ "type": "diffusion",
102
+ "n_obs_steps": 2,
103
+ "input_features": {
104
+ "observation.state": {
105
+ "type": "STATE",
106
+ "shape": [
107
+ 7
108
+ ]
109
+ },
110
+ "observation.images.overhead": {
111
+ "type": "VISUAL",
112
+ "shape": [
113
+ 3,
114
+ 480,
115
+ 640
116
+ ]
117
+ },
118
+ "observation.images.angled": {
119
+ "type": "VISUAL",
120
+ "shape": [
121
+ 3,
122
+ 480,
123
+ 640
124
+ ]
125
+ }
126
+ },
127
+ "output_features": {
128
+ "action": {
129
+ "type": "ACTION",
130
+ "shape": [
131
+ 7
132
+ ]
133
+ }
134
+ },
135
+ "device": "cuda",
136
+ "dtype": null,
137
+ "use_amp": false,
138
+ "use_peft": false,
139
+ "push_to_hub": false,
140
+ "repo_id": null,
141
+ "private": null,
142
+ "tags": null,
143
+ "license": null,
144
+ "pretrained_path": null,
145
+ "pretrained_revision": null,
146
+ "horizon": 64,
147
+ "n_action_steps": 32,
148
+ "normalization_mapping": {
149
+ "VISUAL": "MEAN_STD",
150
+ "STATE": "MIN_MAX",
151
+ "ACTION": "MIN_MAX"
152
+ },
153
+ "drop_n_last_frames": 7,
154
+ "vision_backbone": "resnet18",
155
+ "resize_shape": [
156
+ 240,
157
+ 320
158
+ ],
159
+ "crop_ratio": 1.0,
160
+ "crop_shape": null,
161
+ "crop_is_random": true,
162
+ "pretrained_backbone_weights": "ResNet18_Weights.IMAGENET1K_V1",
163
+ "use_group_norm": false,
164
+ "spatial_softmax_num_keypoints": 32,
165
+ "use_separate_rgb_encoder_per_camera": true,
166
+ "down_dims": [
167
+ 512,
168
+ 1024,
169
+ 2048
170
+ ],
171
+ "kernel_size": 5,
172
+ "n_groups": 8,
173
+ "diffusion_step_embed_dim": 128,
174
+ "use_film_scale_modulation": true,
175
+ "gradient_checkpointing": false,
176
+ "noise_scheduler_type": "DDIM",
177
+ "num_train_timesteps": 100,
178
+ "beta_schedule": "squaredcos_cap_v2",
179
+ "beta_start": 0.0001,
180
+ "beta_end": 0.02,
181
+ "prediction_type": "epsilon",
182
+ "clip_sample": true,
183
+ "clip_sample_range": 1.0,
184
+ "num_inference_steps": 10,
185
+ "compile_model": false,
186
+ "compile_mode": "reduce-overhead",
187
+ "do_mask_loss_for_padding": false,
188
+ "optimizer_lr": 0.0001,
189
+ "optimizer_betas": [
190
+ 0.95,
191
+ 0.999
192
+ ],
193
+ "optimizer_eps": 1e-08,
194
+ "optimizer_weight_decay": 1e-06,
195
+ "scheduler_name": "cosine",
196
+ "scheduler_warmup_steps": 500
197
+ },
198
+ "reward_model": null,
199
+ "output_dir": "outputs/train/diffusion_piper_bolt",
200
+ "job_name": "diffusion_piper_bolt",
201
+ "resume": false,
202
+ "seed": 1000,
203
+ "cudnn_deterministic": false,
204
+ "num_workers": 12,
205
+ "batch_size": 32,
206
+ "prefetch_factor": 4,
207
+ "persistent_workers": true,
208
+ "dataloader_multiprocessing_context": "spawn",
209
+ "steps": 100000,
210
+ "env_eval_freq": 20000,
211
+ "log_freq": 200,
212
+ "eval_steps": 0,
213
+ "max_eval_samples": 0,
214
+ "tolerance_s": 0.0001,
215
+ "save_checkpoint": true,
216
+ "save_freq": 10000,
217
+ "checkpoint_format": "safetensors",
218
+ "use_policy_training_preset": true,
219
+ "optimizer": {
220
+ "type": "adam",
221
+ "lr": 0.0001,
222
+ "weight_decay": 1e-06,
223
+ "grad_clip_norm": 10.0,
224
+ "betas": [
225
+ 0.95,
226
+ 0.999
227
+ ],
228
+ "eps": 1e-08
229
+ },
230
+ "scheduler": {
231
+ "type": "diffuser",
232
+ "num_warmup_steps": 500,
233
+ "name": "cosine"
234
+ },
235
+ "parallelism": {
236
+ "dp_replicate": 1,
237
+ "dp_shard": 1,
238
+ "context_parallel": {
239
+ "ring_degree": 1,
240
+ "ulysses_degree": 1
241
+ },
242
+ "cfg_parallel": 1
243
+ },
244
+ "accelerator": {
245
+ "mixed_precision": "no",
246
+ "gradient_accumulation": {
247
+ "steps": 1
248
+ },
249
+ "grad_scaler": {
250
+ "init_scale": 65536.0,
251
+ "growth_factor": 2.0,
252
+ "backoff_factor": 0.5,
253
+ "growth_interval": 2000
254
+ },
255
+ "fsdp": {
256
+ "reshard_after_forward": true,
257
+ "wrap_modules": null,
258
+ "min_num_params": null,
259
+ "cpu_offload": false,
260
+ "ignored_modules": null
261
+ },
262
+ "ddp": {
263
+ "find_unused_parameters": true,
264
+ "gradient_as_bucket_view": false,
265
+ "static_graph": false
266
+ },
267
+ "compile": {
268
+ "enabled": false,
269
+ "backend": "inductor",
270
+ "mode": null,
271
+ "regional": true
272
+ },
273
+ "activation_checkpointing": {
274
+ "mode": "none"
275
+ }
276
+ },
277
+ "eval": {
278
+ "n_episodes": 50,
279
+ "batch_size": 11,
280
+ "use_async_envs": true,
281
+ "recording": false,
282
+ "recording_repo_id": null,
283
+ "recording_private": false
284
+ },
285
+ "ema": {
286
+ "enable": false,
287
+ "decay": null,
288
+ "update_after_step": 0,
289
+ "inv_gamma": 1.0,
290
+ "power": 0.75,
291
+ "min_decay": 0.0,
292
+ "max_decay": 0.9999,
293
+ "use_for_eval": true
294
+ },
295
+ "wandb": {
296
+ "enable": false,
297
+ "disable_artifact": false,
298
+ "project": "lerobot",
299
+ "entity": null,
300
+ "notes": null,
301
+ "run_id": null,
302
+ "resume": null,
303
+ "mode": null,
304
+ "console": "wrap",
305
+ "console_multipart": false,
306
+ "console_chunk_max_seconds": 0,
307
+ "add_tags": true
308
+ },
309
+ "peft": null,
310
+ "job": {
311
+ "target": null,
312
+ "image": "huggingface/lerobot-gpu:latest",
313
+ "timeout": "2d",
314
+ "detach": false,
315
+ "tags": []
316
+ },
317
+ "save_checkpoint_to_hub": false,
318
+ "sample_weighting": null,
319
+ "rename_map": {},
320
+ "checkpoint_path": null
321
+ }