Guangyan commited on
Commit
92fe599
·
verified ·
1 Parent(s): 11fd3d5

Add files using upload-large-folder tool

Browse files
Files changed (4) hide show
  1. LICENSE +24 -0
  2. README.md +213 -0
  3. config.yaml +158 -0
  4. model.pt +3 -0
LICENSE ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The HOST Authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ Except for third-party code and files that retain their original license
16
+ headers, this repository is released under the MIT License.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - robotics
5
+ - vision-language-action
6
+ - video-generation
7
+ - diffusion
8
+ - world-model
9
+ ---
10
+
11
+ # Self-Grounded Prediction (policy_training/) — released checkpoint
12
+
13
+ This module implements **self-grounded prediction**, the mechanism behind **HOST (Human-to-robot
14
+ One-shot Skill Transfer)** that resolves execution from a coupled visual demonstration: it
15
+ localizes the robot's current progress within a visual demonstration, predicts the robot's own
16
+ future observations conditioned on that localized segment, and derives motor commands from the
17
+ predicted future. This is implemented as a single autoregressive diffusion model with dual
18
+ video/action experts (a Mixture-of-Transformers architecture) built on top of the
19
+ [Fast-WAM](https://arxiv.org/abs/2603.16666) codebase — see [Acknowledgements](#acknowledgements).
20
+
21
+ This is a companion checkpoint for the `policy_training/` module of the HOST code release; see
22
+ that module's own `README.md` / `README_zh.md` for the full pipeline (`data_preprocessing/` →
23
+ `alignment/` → `coupling/` → `policy_training/`).
24
+
25
+ **Training regime: robot→robot, not human→robot.** This checkpoint's task-video conditioning
26
+ comes from peer *robot* demonstration episodes of the same task (via `task_paths.json`), not from
27
+ human demonstration video. It exercises the self-grounded prediction architecture on robot-only
28
+ data, independent of the human-video half of the HOST pipeline (`alignment/`) that gives HOST its
29
+ human→robot transfer capability.
30
+
31
+ ## Index
32
+
33
+ - [Checkpoint Contents](#checkpoint-contents)
34
+ - [Model Preparation](#model-preparation)
35
+ - [Data Preparation](#data-preparation)
36
+ - [Evaluation](#evaluation)
37
+ - [License](#license)
38
+ - [Acknowledgements](#acknowledgements)
39
+ - [BibTeX](#bibtex)
40
+
41
+ ## Checkpoint Contents
42
+
43
+ Trained with `configs/task/real_joint_2cam_224_1e-4_pac_headwise_ncp_ve.yaml`
44
+ (`self_grounded_predictor_joint_cross_attn_ve` model config + `custom_cross_all` data config).
45
+
46
+ ```text
47
+ .
48
+ ├── config.yaml # minimal inference config (model: + trimmed data.train:)
49
+ └── model.pt # ~15.9GB, bf16 + a small fp32 group
50
+ ```
51
+
52
+ `model.pt` is a plain `torch.save` of a nested `state_dict` dict:
53
+ `{"mot", "proprio_encoder", "progress_encoder", "progress_decoder", "visual_encoder", "step",
54
+ "torch_dtype"}`. No optimizer/scheduler/RNG state — inference-only. sha256:
55
+ `89382e2a48c1d4a4c5b1791baff49c8cb5ded731a4b25209f0118e6e5016e86f`.
56
+
57
+ This flat layout is simpler than, and **not directly discoverable by**,
58
+ `policy_training/`'s own training-output / eval-harness convention
59
+ (`{checkpoint_dir}/config.yaml` + `{checkpoint_dir}/checkpoints/weights/step_*.pt`, see
60
+ `SelfGroundedPredictorEval._find_checkpoint` and `Wan22Trainer.save_checkpoint` in the source
61
+ repo) — if you want to drive this checkpoint through `scripts/eval_openloop.sh` rather than
62
+ loading it directly (see [Evaluation](#evaluation)), recreate that structure first:
63
+
64
+ ```bash
65
+ mkdir -p <checkpoint_dir>/checkpoints/weights
66
+ cp config.yaml <checkpoint_dir>/config.yaml
67
+ cp model.pt <checkpoint_dir>/checkpoints/weights/step_000000.pt # any step_<N>.pt name works
68
+ ```
69
+
70
+ `config.yaml` is **not** the verbatim training config — it's trimmed to exactly what
71
+ `SelfGroundedPredictorEval` / `evaluate_openloop.py` actually read from `data.train` (verified by
72
+ grepping every `dcfg.*` access in the source repo's eval code), plus the full `model:` section
73
+ (every field there is a real constructor kwarg of `create_self_grounded_predictor`, so none of it
74
+ is droppable). The full field-for-field comparison against
75
+ `hydra.compose(config_name="train", overrides=["task=real_joint_2cam_224_1e-4_pac_headwise_ncp_ve"])`
76
+ on the current `policy_training/configs/` is documented inline in `config.yaml`'s header comment,
77
+ along with the two content deviations (both marked `NOTE(released checkpoint)`):
78
+
79
+ 1. **`_target_` paths** (`model._target_`, `data.train._target_`) — this training run predates the
80
+ `fastwam` → `self_grounded_prediction` rename, so its own saved config still pointed at the old
81
+ internal module path. Updated to `self_grounded_prediction.*` here.
82
+ 2. **`model.visual_encoder.{backbone_local_repo,backbone_weights_path,siglip_local_weights_path}`**
83
+ — set to `null` instead of this team's internal cluster paths. `visual_encoder.py` already falls
84
+ back to downloading the public DINOv2 (`torch.hub`, `facebookresearch/dinov2`) and SigLIP (TIMM)
85
+ base architectures when these are unset; safe here specifically because this checkpoint's own
86
+ fine-tuned `visual_encoder` weights are loaded on top immediately after and overwrite whatever
87
+ the fallback initialized. (This is the exact gap tracked in the source repo's
88
+ `OPEN_SOURCE_PATH_TODOS.md`, row 1 of the load-bearing table — nulling it in this standalone
89
+ checkpoint's config doesn't require that doc's "re-verify full training run" process, since this
90
+ is a separate artifact from the repo's own shipped default model config.)
91
+
92
+ Dropped entirely (not read by the eval harness or by `instantiate(cfg.model)` +
93
+ `load_checkpoint()`): `data.val` / `data.extra_val`, all top-level training-loop fields (wandb,
94
+ output_dir, batch_size, learning_rate, `staged_unfreeze`, ...), `data_path` (this team's internal
95
+ video-paths list — not shippable and not read at eval time anyway), and the
96
+ `data.train` fields that only matter for constructing a live training dataset (augmentation flags,
97
+ drop probabilities, indicator/prompt flags, etc.).
98
+
99
+ `cam_mapping_dir` and `joint_action_mapping_dir` are set to `null` and **are required** — the
100
+ model construction/eval path reads them directly, and `joint_action_mapping_dir` in particular
101
+ holds the per-dataset normalization stats (`norm_min`/`norm_delta` for actions and joints) needed
102
+ to convert this model's `[-1, 1]`-normalized action outputs to physical joint angles /
103
+ end-effector poses. Without it, `eval/real_openloop/` cannot run, and loading the model directly
104
+ via `instantiate()` + `load_checkpoint()` only gets you normalized-space outputs. See
105
+ [Data Preparation](#data-preparation) for the expected format.
106
+
107
+ ## Model Preparation
108
+
109
+ This step is required before loading this checkpoint (mirrors `policy_training/README.md`'s own
110
+ "Model Preparation" section — any user of that repo runs this regardless of whose weights they
111
+ load).
112
+
113
+ Step 1: set the Wan model directory first (optional, default `./checkpoints`):
114
+
115
+ ```bash
116
+ cd policy_training
117
+ mkdir -p checkpoints
118
+ export DIFFSYNTH_MODEL_BASE_PATH="$(pwd)/checkpoints"
119
+ ```
120
+
121
+ Step 2: pre-generate the ActionDiT backbone (interpolated from Wan2.2 DiT) — the model
122
+ construction code reads this file to build the action expert's architecture before this
123
+ checkpoint's weights are loaded on top and overwrite it:
124
+
125
+ ```bash
126
+ python scripts/preprocess_action_dit_backbone.py \
127
+ --model-config <this-checkpoint-dir>/config.yaml \
128
+ --output checkpoints/ActionDiT_linear_interp_Wan22_alphascale_1024hdim.pt \
129
+ --device cuda \
130
+ --dtype bfloat16
131
+ ```
132
+
133
+ ## Data Preparation
134
+
135
+ `policy_training/` and `alignment/` consume the same on-disk data convention — see
136
+ `data_preprocessing/README.md` at the repo root for the full, single-source-of-truth schema
137
+ (video-paths list, episode directory layout, camera mapping, joint/action normalization). This
138
+ checkpoint's `config.yaml` ships `cam_mapping_dir` / `joint_action_mapping_dir` as `null` — fill
139
+ in your own data prepared in that format before running evaluation. If you want to fine-tune
140
+ rather than just load this checkpoint, start from the repo's own
141
+ `configs/data/custom_cross_all.yaml` (the full, non-trimmed data config with `data_path`, `val`,
142
+ `extra_val`, and augmentation settings) rather than expanding this minimal inference config back
143
+ out by hand.
144
+
145
+ ## Evaluation
146
+
147
+ `eval/real_openloop/` runs the model open-loop against your own episode data (the same format as
148
+ [Data Preparation](#data-preparation)), predicting an action chunk from the current observation
149
+ and comparing it against ground truth — this is **not** a live-robot control loop, it replays a
150
+ recorded dataset.
151
+
152
+ **Option A — this repo's own eval harness** (after recreating the `checkpoints/weights/step_*.pt`
153
+ layout per [Checkpoint Contents](#checkpoint-contents), filling in `cam_mapping_dir` /
154
+ `joint_action_mapping_dir`, and pointing `EVAL_DATA_PATH`/`DATASET_NAME` at your own episodes):
155
+
156
+ ```bash
157
+ cd policy_training
158
+ CHECKPOINT_DIR=<path-to-restructured-checkpoint-dir> bash scripts/eval_openloop.sh
159
+ ```
160
+
161
+ **Option B — load directly** (works with this checkpoint's flat layout as-is):
162
+
163
+ ```python
164
+ import torch
165
+ from omegaconf import OmegaConf
166
+ from hydra.utils import instantiate
167
+
168
+ cfg = OmegaConf.load("config.yaml")
169
+ model = instantiate(cfg.model, model_dtype=torch.bfloat16, device="cuda")
170
+ model.load_checkpoint("model.pt")
171
+ model.eval()
172
+ ```
173
+
174
+ `load_checkpoint` loads with `strict=False` per sub-module and logs any missing/unexpected keys —
175
+ on a matching code version, all keys should match exactly. On first load, `config.yaml` triggers a
176
+ public download of the Wan2.2-TI2V-5B VAE, the Wan2.1-T2V-1.3B text encoder/tokenizer, and the
177
+ DINOv2/SigLIP base architectures (all immediately overwritten by this checkpoint's weights where
178
+ applicable, except the VAE/text encoder, which aren't part of this checkpoint at all).
179
+
180
+ ## License
181
+
182
+ Released under the MIT License (same as `policy_training/`'s own `LICENSE`). This is a fine-tune
183
+ built on top of publicly released base models, each under their own license:
184
+ [Wan2.2-TI2V-5B](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B) /
185
+ [Wan2.1-T2V-1.3B](https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B) (Apache 2.0),
186
+ [DINOv2](https://github.com/facebookresearch/dinov2) (Apache 2.0), SigLIP SO400M (Apache 2.0).
187
+
188
+ ## Acknowledgements
189
+
190
+ This module's codebase is built on top of
191
+ [Fast-WAM: Do World Action Models Need Test-time Future Imagination?](https://arxiv.org/abs/2603.16666)
192
+ (Yuan et al.). We thank the Fast-WAM authors for releasing their codebase.
193
+
194
+ ## BibTeX
195
+
196
+ If you find our work helpful, please consider citing:
197
+
198
+ ```bibtex
199
+ @article{host2026,
200
+ title={HOST: Human-to-robot One-shot Skill Transfer},
201
+ % TODO: fill in authors, venue, year, DOI/arXiv once available
202
+ }
203
+ ```
204
+
205
+ ## Pushing to the Hub
206
+
207
+ Prepared but not pushed (no network egress / credentials in the environment this was prepared
208
+ in). From a machine with a Hugging Face account and CLI access:
209
+
210
+ ```bash
211
+ huggingface-cli login # if not already logged in
212
+ huggingface-cli upload <your-org-or-username>/<repo-name> . . --repo-type model
213
+ ```
config.yaml ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Minimal inference config for this checkpoint.
2
+ #
3
+ # This is NOT the verbatim training config.yaml — it's been trimmed to exactly the
4
+ # fields `SelfGroundedPredictorEval` / `eval/real_openloop/evaluate_openloop.py` read
5
+ # from `data.train` (verified by grepping `dcfg.` in self_grounded_predictor_eval.py)
6
+ # plus the full `model:` section (every field there is a real constructor kwarg of
7
+ # `create_self_grounded_predictor`, so none of it is droppable).
8
+ #
9
+ # Dropped entirely: `data.val` / `data.extra_val` (training-only, never read by the
10
+ # eval harness or by `instantiate(cfg.model)` + `load_checkpoint()`), and top-level
11
+ # training-loop fields (wandb, output_dir, batch_size, learning_rate, staged_unfreeze,
12
+ # ...) — none of these affect loading or running this checkpoint.
13
+ #
14
+ # `dataset_image_size` / `dataset_fps` here only carry the 3 dataset ids that had real
15
+ # entries in the original training config (10042, 10053, 10058) — the training data mix
16
+ # also included 10034/10035/10040/10043/10069/10070/10072, but those never had their own
17
+ # `dataset_fps`/`dataset_image_size` entries either, so they add nothing to keep here.
18
+ # If you're evaluating against a different dataset id, add its own entry following the
19
+ # same pattern (all were 224x224 in this run).
20
+ #
21
+ # `data_path` / `cam_mapping_dir` / `joint_action_mapping_dir` are set to `null` below —
22
+ # this team's internal cluster values were removed rather than shipped as unusable
23
+ # examples. `cam_mapping_dir` and `joint_action_mapping_dir` are required (the model
24
+ # construction/eval path reads them directly); `joint_action_mapping_dir` also holds the
25
+ # norm_min/norm_delta stats needed to denormalize this model's [-1, 1] action outputs to
26
+ # physical joint angles / end-effector poses. See data_preprocessing/README.md for the
27
+ # expected format, and the repo's own configs/data/custom_cross_all.yaml if you want the
28
+ # full example (including val/extra_val, augmentation flags, etc.) for fine-tuning
29
+ # rather than just loading this checkpoint.
30
+
31
+ data:
32
+ train:
33
+ _target_: self_grounded_prediction.datasets.custom.mydatasets.build_custom_dataset
34
+ cam_mapping_dir: null
35
+ joint_action_mapping_dir: null
36
+ frames: 2
37
+ action_frames: 15
38
+ use_6d_rotation: true
39
+ use_relative_action: true
40
+ remove_static_frames: true
41
+ static_rot_threshold: 0.001
42
+ static_trans_threshold: 0.001
43
+ static_gripper_threshold: 0.001
44
+ dataset_image_size:
45
+ '10042': [224, 224]
46
+ '10053': [224, 224]
47
+ '10058': [224, 224]
48
+ processor:
49
+ action_output_dim: 22
50
+ proprio_output_dim: 20
51
+ action_video_freq_ratio: 6
52
+ max_action_len: 24
53
+ context_len: 512
54
+ dataset_fps:
55
+ '10042': 24
56
+ '10053': 24
57
+ '10058': 24
58
+ task_max_frames:
59
+ 2: [6, 6]
60
+
61
+ model:
62
+ # NOTE: create_self_grounded_predictor instantiates SelfGroundedPredictorJoint (NOT
63
+ # the SelfGroundedPredictor base). SelfGroundedPredictorJoint._build_mot_attention_mask:
64
+ # action attends to ALL video tokens in self-attn. Base class (do NOT confuse): action
65
+ # only attends to first-frame video tokens.
66
+ _target_: self_grounded_prediction.runtime.create_self_grounded_predictor
67
+ model_id: Wan-AI/Wan2.2-TI2V-5B
68
+ tokenizer_model_id: Wan-AI/Wan2.1-T2V-1.3B
69
+ tokenizer_max_len: 512
70
+ load_text_encoder: false # SelfGroundedPredictorEval overrides this to true at eval time
71
+ proprio_dim: 20
72
+ redirect_common_files: true
73
+ mot_checkpoint_mixed_attn: false
74
+ action_dit_pretrained_path: checkpoints/ActionDiT_linear_interp_Wan22_alphascale_1024hdim.pt
75
+ skip_dit_load_from_pretrain: false
76
+ video_dit_config:
77
+ has_image_input: false
78
+ patch_size: [1, 2, 2]
79
+ in_dim: 48
80
+ hidden_dim: 3072
81
+ ffn_dim: 14336
82
+ freq_dim: 256
83
+ text_dim: 4096
84
+ out_dim: 48
85
+ num_heads: 24
86
+ attn_head_dim: 128
87
+ num_layers: 30
88
+ eps: 1.0e-06
89
+ seperated_timestep: true
90
+ require_clip_embedding: false
91
+ require_vae_embedding: false
92
+ fuse_vae_embedding_in_latents: true
93
+ use_gradient_checkpointing: false
94
+ use_task_video_cross_attn: true
95
+ video_attention_mask_mode: first_frame_causal
96
+ action_conditioned: false
97
+ action_dim: 22
98
+ action_group_causal_mask_mode: group_diagonal
99
+ attn_gate_mode: headwise
100
+ task_video_cross_attn_gate_mode: headwise
101
+ action_dit_config:
102
+ action_dim: 22
103
+ hidden_dim: 1024
104
+ ffn_dim: 4096
105
+ num_heads: 24
106
+ attn_head_dim: 128
107
+ num_layers: 30
108
+ text_dim: 4096
109
+ freq_dim: 256
110
+ eps: 1.0e-06
111
+ use_gradient_checkpointing: false
112
+ use_task_video_cross_attn: true
113
+ task_video_ctx_dim: 3072
114
+ attn_gate_mode: headwise
115
+ task_video_cross_attn_gate_mode: headwise
116
+ video_scheduler:
117
+ train_shift: 5.0
118
+ infer_shift: 5.0
119
+ num_train_timesteps: 1000
120
+ action_scheduler:
121
+ train_shift: 5.0
122
+ infer_shift: 5.0
123
+ num_train_timesteps: 1000
124
+ loss:
125
+ lambda_action: 10.0
126
+ lambda_progress: 1.0
127
+ task_video_conditioning_mode: prepend_cross_attn
128
+ log_cross_attn_weights: true
129
+ action_prediction_type: sample
130
+ video_prediction_type: velocity
131
+ progress_prediction_type: sample
132
+ noise_to_progress_token: false
133
+ use_noisy_progress_group: true
134
+ num_inference_steps_progress: 10
135
+ noise_clean_progress_token: true
136
+ noise_clean_progress_prob: 0.5
137
+ noise_clean_progress_scale: 0.5
138
+ action_self_attn_to_task_video: true
139
+ progress_scheduler:
140
+ num_train_timesteps: 1000
141
+ train_shift: 3.0
142
+ infer_shift: 3.0
143
+ visual_encoder:
144
+ enabled: true
145
+ backbone_name: dinosiglip_vitb14_so400m
146
+ num_cameras: 2
147
+ camera_input_size: 224
148
+ proj_hidden: 4096
149
+ dropout: 0.0
150
+ lr_scale: 10.0
151
+ # These 3 were internal cluster paths in the original training config. Left null:
152
+ # visual_encoder.py already falls back to downloading the public DINOv2 (torch.hub,
153
+ # facebookresearch/dinov2) and SigLIP (TIMM) base architectures when unset — safe
154
+ # here because this checkpoint's own fine-tuned visual_encoder weights are loaded on
155
+ # top immediately after and overwrite whatever the fallback initialized.
156
+ backbone_local_repo: null
157
+ backbone_weights_path: null
158
+ siglip_local_weights_path: null
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89382e2a48c1d4a4c5b1791baff49c8cb5ded731a4b25209f0118e6e5016e86f
3
+ size 17027987184