Leejungwook commited on
Commit
4ab5f9a
·
verified ·
1 Parent(s): 511cdee

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +89 -0
  3. model.safetensors +3 -0
  4. train_config.json +224 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: Leejungwook/cube_stack
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,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.images.main": {
6
+ "type": "VISUAL",
7
+ "shape": [
8
+ 3,
9
+ 720,
10
+ 1280
11
+ ]
12
+ },
13
+ "observation.state": {
14
+ "type": "STATE",
15
+ "shape": [
16
+ 7
17
+ ]
18
+ }
19
+ },
20
+ "output_features": {
21
+ "action": {
22
+ "type": "ACTION",
23
+ "shape": [
24
+ 7
25
+ ]
26
+ }
27
+ },
28
+ "device": "cuda",
29
+ "use_amp": false,
30
+ "use_peft": false,
31
+ "push_to_hub": true,
32
+ "repo_id": "Leejungwook/diffusion_cube_stack",
33
+ "private": null,
34
+ "tags": null,
35
+ "license": null,
36
+ "pretrained_path": null,
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": 8,
45
+ "vision_backbone": "resnet18",
46
+ "resize_shape": [
47
+ 240,
48
+ 320
49
+ ],
50
+ "crop_ratio": 0.9,
51
+ "crop_shape": [
52
+ 216,
53
+ 288
54
+ ],
55
+ "crop_is_random": true,
56
+ "pretrained_backbone_weights": null,
57
+ "use_group_norm": true,
58
+ "spatial_softmax_num_keypoints": 32,
59
+ "use_separate_rgb_encoder_per_camera": false,
60
+ "down_dims": [
61
+ 256,
62
+ 512
63
+ ],
64
+ "kernel_size": 5,
65
+ "n_groups": 8,
66
+ "diffusion_step_embed_dim": 256,
67
+ "use_film_scale_modulation": true,
68
+ "noise_scheduler_type": "DDIM",
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": 20,
77
+ "compile_model": false,
78
+ "compile_mode": "reduce-overhead",
79
+ "do_mask_loss_for_padding": false,
80
+ "optimizer_lr": 0.0003,
81
+ "optimizer_betas": [
82
+ 0.95,
83
+ 0.999
84
+ ],
85
+ "optimizer_eps": 1e-08,
86
+ "optimizer_weight_decay": 1e-06,
87
+ "scheduler_name": "cosine",
88
+ "scheduler_warmup_steps": 1000
89
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6c38f6a52042ba763067ef138e2c5cf8da4d47f328736ac89990a0277b437cd
3
+ size 112251828
train_config.json ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "Leejungwook/cube_stack",
4
+ "root": "/home/moai/.cache/huggingface/lerobot/Leejungwook/cube_stack",
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": null,
83
+ "policy": {
84
+ "type": "diffusion",
85
+ "n_obs_steps": 1,
86
+ "input_features": {
87
+ "observation.images.main": {
88
+ "type": "VISUAL",
89
+ "shape": [
90
+ 3,
91
+ 720,
92
+ 1280
93
+ ]
94
+ },
95
+ "observation.state": {
96
+ "type": "STATE",
97
+ "shape": [
98
+ 7
99
+ ]
100
+ }
101
+ },
102
+ "output_features": {
103
+ "action": {
104
+ "type": "ACTION",
105
+ "shape": [
106
+ 7
107
+ ]
108
+ }
109
+ },
110
+ "device": "cuda",
111
+ "use_amp": false,
112
+ "use_peft": false,
113
+ "push_to_hub": true,
114
+ "repo_id": "Leejungwook/diffusion_cube_stack",
115
+ "private": null,
116
+ "tags": null,
117
+ "license": null,
118
+ "pretrained_path": null,
119
+ "horizon": 16,
120
+ "n_action_steps": 8,
121
+ "normalization_mapping": {
122
+ "VISUAL": "MEAN_STD",
123
+ "STATE": "MIN_MAX",
124
+ "ACTION": "MIN_MAX"
125
+ },
126
+ "drop_n_last_frames": 8,
127
+ "vision_backbone": "resnet18",
128
+ "resize_shape": [
129
+ 240,
130
+ 320
131
+ ],
132
+ "crop_ratio": 0.9,
133
+ "crop_shape": [
134
+ 216,
135
+ 288
136
+ ],
137
+ "crop_is_random": true,
138
+ "pretrained_backbone_weights": null,
139
+ "use_group_norm": true,
140
+ "spatial_softmax_num_keypoints": 32,
141
+ "use_separate_rgb_encoder_per_camera": false,
142
+ "down_dims": [
143
+ 256,
144
+ 512
145
+ ],
146
+ "kernel_size": 5,
147
+ "n_groups": 8,
148
+ "diffusion_step_embed_dim": 256,
149
+ "use_film_scale_modulation": true,
150
+ "noise_scheduler_type": "DDIM",
151
+ "num_train_timesteps": 100,
152
+ "beta_schedule": "squaredcos_cap_v2",
153
+ "beta_start": 0.0001,
154
+ "beta_end": 0.02,
155
+ "prediction_type": "epsilon",
156
+ "clip_sample": true,
157
+ "clip_sample_range": 1.0,
158
+ "num_inference_steps": 20,
159
+ "compile_model": false,
160
+ "compile_mode": "reduce-overhead",
161
+ "do_mask_loss_for_padding": false,
162
+ "optimizer_lr": 0.0003,
163
+ "optimizer_betas": [
164
+ 0.95,
165
+ 0.999
166
+ ],
167
+ "optimizer_eps": 1e-08,
168
+ "optimizer_weight_decay": 1e-06,
169
+ "scheduler_name": "cosine",
170
+ "scheduler_warmup_steps": 1000
171
+ },
172
+ "output_dir": "outputs/train/2026-03-18/18-49-46_diffusion_cube_stack",
173
+ "job_name": "diffusion_cube_stack",
174
+ "resume": false,
175
+ "seed": 233,
176
+ "cudnn_deterministic": false,
177
+ "num_workers": 4,
178
+ "batch_size": 64,
179
+ "steps": 50000,
180
+ "eval_freq": 20000,
181
+ "log_freq": 100,
182
+ "tolerance_s": 0.0001,
183
+ "save_checkpoint": true,
184
+ "save_freq": 5000,
185
+ "use_policy_training_preset": true,
186
+ "optimizer": {
187
+ "type": "adam",
188
+ "lr": 0.0003,
189
+ "weight_decay": 1e-06,
190
+ "grad_clip_norm": 10.0,
191
+ "betas": [
192
+ 0.95,
193
+ 0.999
194
+ ],
195
+ "eps": 1e-08
196
+ },
197
+ "scheduler": {
198
+ "type": "diffuser",
199
+ "num_warmup_steps": 1000,
200
+ "name": "cosine"
201
+ },
202
+ "eval": {
203
+ "n_episodes": 50,
204
+ "batch_size": 50,
205
+ "use_async_envs": false
206
+ },
207
+ "wandb": {
208
+ "enable": false,
209
+ "disable_artifact": false,
210
+ "project": "lerobot",
211
+ "entity": null,
212
+ "notes": null,
213
+ "run_id": null,
214
+ "mode": null
215
+ },
216
+ "peft": null,
217
+ "use_rabc": false,
218
+ "rabc_progress_path": null,
219
+ "rabc_kappa": 0.01,
220
+ "rabc_epsilon": 1e-06,
221
+ "rabc_head_mode": "sparse",
222
+ "rename_map": {},
223
+ "checkpoint_path": null
224
+ }