Introduction#
PredActor (Predictive Action Diffusion) is an open-source humanoid diffusion control policy. From recent proprioceptive observations and optional task commands, it jointly predicts future whole-body states and joint actions. Predicted states remain internal to the policy for guidance; actions go directly to the joint controller without a separate tracker.
On an onboard Jetson Orin NX, PredActor runs at 50 Hz. The full control callback takes a median 16.790 ms and p95 19.383 ms, both below the 20 ms control period.
Resources:
1. Overview#
This section covers how PredActor works, release contents, and environment setup. By the end, you can open the local browser evaluation interface and control a simulated robot with text commands.
1.1 What PredActor Can Do#
| Workflow | Purpose | See |
|---|---|---|
| Browser evaluation | Run the released model in MuJoCo, control it with text, a gamepad, velocity guidance, or destinations, and apply external forces | Section 2 |
| Data collection | Execute 152 motions with a teacher policy in Isaac Lab and record state–action trajectories | Section 3 |
| Data annotation | Use MotionCLIP to attach a 512-dimensional, text-aligned motion semantic vector to each frame | Section 4 |
| Training | Behavior-clone a text-conditioned policy or unconditional baseline | Section 5 |
| Motion encoder training (experimental) | Train MotionCLIP from scratch to replace the annotation model | Section 6 |
DAgger data aggregation and real-robot deployment code have not been released. Running in MuJoCo establishes software and weight compatibility, not real-robot safety; deployment requires separate control, safety, and hardware validation.
1.2 How It Works#
Read proprioception. Control runs at 50 Hz (0.02-second periods). Each cycle reads the latest 4 observations: joint positions and velocities, projected gravity, base linear and angular velocities, and the previous action, totaling 96 dimensions per step. The text-conditioned policy adds a 512-dimensional text semantic vector.
Jointly generate states and actions. A Transformer diffusion model jointly denoises 20 future steps (0.4 seconds) of whole-body states—positions and velocities of 30 bodies plus root state—and 29-dimensional joint actions. The released text-conditioned configuration uses 5 DDIM denoising steps per cycle.
Execute actions only. The current action goes directly to the joint PD controller. Predicted future states remain inside the policy and are not passed to a tracker.
Two forms of guidance. CFG (classifier-free guidance) strengthens conditions learned during training, such as text commands. CG (classifier guidance, called whole-body guidance in the interface) imposes targets on predicted future states—forward, lateral, and yaw velocities, or pelvis height—steering states during denoising and thereby influencing actions.
Proprioceptive observations only. During inference, the state stream is denoised directly from conditions; externally estimated whole-body states are not required as inputs.
1.3 Released Models and Data#
Models and data are hosted in MasterYip/PredActor_Artifacts on Hugging Face. Downloads go into the Git-ignored Artifacts/ directory at the repository root:
| File | Purpose | Size | Used for |
|---|---|---|---|
checkpoints/predactor/pdp051/latest.ckpt |
Released text-conditioned PDP051 policy | 49.2 MB | Evaluation (Section 2) |
checkpoints/motionclip/g1-model-xyz-clip/checkpoint_0100.pth.tar |
Fine-tuned MotionCLIP motion–text encoder | 542.7 MB | Text encoding during evaluation and data annotation (Sections 2, 4) |
checkpoints/rl_tracker/model_75000.pt |
RLTracker teacher policy | 87.4 MB | Data collection (Section 3) |
motions/g1_152fk/ |
152 retargeted motions, one motion.npz per motion |
About 87 MB | Collection and annotation (Sections 3, 4) |
1.4 Two Environments#
| Environment | Purpose | Setup |
|---|---|---|
uv environment (.venv) |
Evaluation, annotation, policy training, and motion encoder training | uv sync --locked, with versions pinned by uv.lock |
conda environment predactor-collection |
Data collection only (Isaac Sim 4.5.0 + Isaac Lab 2.1.0) | PredActor/collection/install.sh; see Section 3.2 |
1.5 System Requirements#
| Item | Requirement |
|---|---|
| Operating system | Linux |
| Python | 3.10 |
| Package manager | uv (required); conda (data collection only) |
| PyTorch | 2.5.1, CUDA 12.1 wheel (both environments) |
| GPU | Evaluation uses CUDA when available and falls back to CPU. Training defaults to cuda:0 but can use CPU. Annotation defaults to CUDA. Collection requires an NVIDIA GPU capable of running Isaac Sim 4.5.0 |
| Network | The first annotation and motion encoder training runs download OpenAI CLIP ViT-B/32 weights. Collection setup accesses PyTorch and NVIDIA package indexes and GitHub |
1.6 Installation#
git clone https://github.com/MasterYip/PredActor.git
cd PredActor
uv sync --lockeduv sync --locked creates a Python 3.10 environment from uv.lock, including the evaluator, MuJoCo, browser interface, and training dependencies. Evaluation does not require Isaac Sim.
Tip Evaluation commands use
--lockedto keep the runtime consistent with the lockfile.uv run --lockeduses this environment directly; activation is unnecessary.
1.7 Download Models#
uv run --locked python scripts/hf_download.py --filter checkpoints--filter selects path prefixes in the Hugging Face repository. checkpoints downloads all three checkpoints in Section 1.3; motions/g1_152fk downloads motion data. After downloading, the script verifies file sizes and SHA-256 hashes.
| Command | Purpose |
|---|---|
… hf_download.py --filter checkpoints |
Download all three checkpoints (sufficient for evaluation) |
… hf_download.py --filter checkpoints motions/g1_152fk |
Also download 152 motions for reproducing collection and training |
… hf_download.py --list |
List all downloadable items and local paths |
… hf_download.py --dry-run |
Show planned downloads without downloading |
Existing downloads of matching size are skipped. After a network interruption, rerun the same command to fetch only missing files or those with incorrect sizes.
1.8 Run Quick Checks#
uv run --locked predactor-evalThis command loads the PDP051 policy and MotionCLIP encoder, starts MuJoCo, and opens http://127.0.0.1:8765/ in a browser. A visible robot and increasing STEP count indicate a working evaluator. Enter walk in CLIP command and press Enter; the robot should transition from standing to walking.
Check the training environment with a smoke test that requires no downloaded data:
uv run python PredActor/scripts/training_smoke.pyIt generates a small deterministic dataset, performs one optimization step with a reduced model, and checks the saved checkpoint. Success prints PREDACTOR_TRAINING_SMOKE_PASS and the record path. This checks execution paths, not model quality.
1.9 Directory Layout#
PredActor/ # Repository root; run commands here
├── Artifacts/ # Downloaded models/data and collection/annotation outputs
│ ├── checkpoints/
│ ├── motions/g1_152fk/
│ └── dataset/ # Written by Sections 3 and 4
├── outputs/ # Training outputs (Section 5)
├── eval_output/web/ # Default evaluation outputs (Section 2)
└── PredActor/ # Source
├── diffusion_policy/ # Policy, trainer, evaluator, and web interface
├── collection/ # Data collection and annotation
└── motion_encoder/ # Motion encoder training2. Evaluation#
This section runs the policy in the browser evaluator. Select behavior with text, control direction with velocity guidance, a gamepad, or destinations, and apply external forces with the mouse. Run all commands from the repository root.
2.1 Start Evaluation#
uv run --locked predactor-evalWithout additional arguments, the released PDP051 policy is used. Common options:
| Option | Purpose | Default |
|---|---|---|
-c, --checkpoint |
Policy checkpoint | Artifacts/checkpoints/predactor/pdp051/latest.ckpt |
--config |
Evaluation configuration; a filename alone is resolved under PredActor/diffusion_policy/config_files/ |
g1prdp_cond_diffuse.yaml |
-o, --output_dir |
Result output directory | eval_output/web |
-d, --device |
Inference device | cuda:0 if CUDA is available, otherwise cpu |
--precision |
Inference precision: fp32 or fp16 |
Configuration's training.precision, falling back to fp32 |
--checkpoint-replica |
Use agent or ema_agent weights |
agent |
--web-port |
Interface port | 8765 |
--web-host |
Interface bind address | 127.0.0.1 |
--web-no-browser |
Do not open a browser automatically | Off |
--headless |
Do not open the MuJoCo window or other graphical interfaces | Does not override configuration |
--web-perturb |
Allow mouse-applied forces (Section 2.7) | Off |
See all options with uv run --locked predactor-eval --help.
On a server without a display, launch headlessly and forward the port to your local browser:
# On the server
uv run --locked predactor-eval --headless --web-no-browser
# On your local machine; after forwarding, open http://127.0.0.1:8765/
ssh -L 8765:127.0.0.1:8765 <username>@<server-address>Replace <username>@<server-address> with your server login. If port 8765 is occupied, add --web-port 8766 to use another port.
2.2 Select Behavior with Text#
Select TEXTOP in the right-hand CLIP command panel.
Enter an action description and press Enter or click ↑. Suggested examples include
walk,jog,run,squat down,jump up,raise hand, andkick.The panel shows the active command. The startup default is
stand.
MotionCLIP encodes the text into a 512-dimensional vector used as a policy condition.
Note Training data contains only 152 motions; more complex descriptions are less likely to produce the intended behavior. Start with the simple commands above.
2.3 Interpolate Between Behaviors#
INTERP combines weighted “start → end” semantic directions into a continuously varying condition:
Select INTERP in CLIP command. Default propositions are zero vector →
stand,stand→walk,walk→run,stand→squat down, andget down→raise hand. Only the first has weight 1 by default; the rest are 0.Drag a row's weight slider. If either endpoint is the zero vector (Ø), the range is 0–1; with text at both endpoints, it is −1 to 1.
Use + to add propositions, up to 16. You can edit each start and end text.
Click APPLY. The weighted sum is normalized and used as the new condition.
2.4 Control Velocity with Whole-Body Guidance#
The Whole-body guidance panel imposes velocity targets directly on predicted future states:
Confirm the switch beside the panel title is Enabled.
Set SOURCE OWNER to WEB for sliders or JOY for a gamepad (Section 2.6).
Adjust Forward, Lateral, and Yaw to set forward, lateral, and turning velocity targets.
Gain Kp controls guidance strength, default 1.00 and range 0–4. Setting it to 0 disables guidance effects.
Advanced Activation manager options select affected body parts and observations for each guidance type; usually no changes are needed. Click ↺ there to restore defaults.
Text and whole-body guidance can be used together: text selects how to move, such as walking or jogging, while guidance sets direction and speed.
2.5 Move to a Destination#
Destination follow automatically derives velocity targets from a destination:
Enter the target position in world coordinates in X, Y, and Z.
Click SET to set the destination and enable following. The robot turns and moves toward it; once horizontal distance is within the arrival radius, velocity targets become zero and it stops.
If pushed farther away than the rearm radius after arrival, following resumes.
Click CANCEL to disable following and clear the target.
Controller tuning parameters take effect after clicking APPLY:
| Parameter | Purpose | Default |
|---|---|---|
| Forward gain / Lateral gain / Heading gain | Following gains for forward motion, lateral motion, and heading | 2.00 / 0.80 / 6.00 |
| Forward min / max | Forward velocity target range | 0 / 8 |
| Lateral min / max | Lateral velocity target range | −1 / 1 |
| Yaw min / max | Turning velocity target range | −10 / 10 |
| Heading dead zone | Heading-error dead zone | 0.01 |
| Arrival radius | Arrival radius | 0.30 |
| Rearm radius | Radius for resuming following; cannot be smaller than arrival radius | 0.60 |
2.6 Gamepad Control#
By default, the evaluator automatically detects Linux gamepads (--web-joystick-device auto) and uses Xbox mappings (--web-joystick-type xbox_new). A gamepad detected at startup sets whole-body guidance to JOY; the Controller panel displays button states. These controls apply with JOY selected:
| Action | Gamepad input |
|---|---|
| Forward / backward | Left stick up/down |
| Strafe left/right | Left stick left/right |
| Turn | Right stick left/right |
| Pelvis height | Right stick up/down |
Switch to stand / walk / jog / squat down |
D-pad up / right / down / left |
| Reduce guidance | Press LT (L2): strength decreases from 1 to 0 with trigger pressure, returning to 1 on release |
| Toggle whole-body guidance | LB |
Click ? in the Controller panel to view the current gamepad mapping.
2.7 Apply Forces and Reset#
Launch with --web-perturb to push the robot with the mouse in the simulation view:
| Input | Action |
|---|---|
| Double-click | Select a rigid body |
| Ctrl + right-drag | Apply force at the selected point |
| Ctrl + left-drag | Apply torque to the selected rigid body |
An orange arrow shows drag direction and magnitude. Force and torque limits default to 120 and 30; adjust them with --web-perturb-max-force and --web-perturb-max-torque. ↺ (Reset MuJoCo robot) on the simulation toolbar resets the robot. AUTO RESET resets it automatically after falls. ❚❚ at the top pauses evaluation.
2.8 Evaluate Your Trained Model#
Set run_dir to the output directory printed during training (Section 5.4):
run_dir="outputs/<training-output-directory>"
uv run --locked predactor-eval \
--checkpoint "$run_dir/checkpoints/latest.ckpt" \
--config "$run_dir/resolved_config.yaml" \
--output_dir "$run_dir/eval" \
--web-uiThe saved resolved_config.yaml determines which policy and text encoder are loaded. The unconditional baseline (Section 5.2) also accepts text commands, but text has no effect on it.
2.9 Evaluation Outputs#
After evaluation, the output directory contains:
| File | Contents |
|---|---|
eval_results.json |
Evaluation results |
eval_config.yaml |
Effective configuration for this evaluation |
eval_summary.txt |
Result summary |
3. Data Collection#
This section runs motion-library entries with the released RLTracker teacher in Isaac Lab and records state–action trajectories for PredActor training. Collection uses a separate conda environment. Run commands from the repository root.
3.1 Prepare Inputs#
Download the teacher policy and 152 motions in the uv environment:
uv run --locked python scripts/hf_download.py \
--filter checkpoints/rl_tracker motions/g1_152fkDefault download locations:
Artifacts/
├── checkpoints/rl_tracker/model_75000.pt
└── motions/g1_152fk/
├── <motion-name>/motion.npz
└── ... # 152 motions in total3.2 Install the Collection Environment#
conda create --override-channels -c conda-forge -n predactor-collection python=3.10 -y
conda activate predactor-collection
bash PredActor/collection/install.shThe installation script performs these steps:
Verify Python 3.10; exit otherwise.
Install PyTorch 2.5.1 (CUDA 12.1) and Isaac Sim 4.5.0.
Download a pinned Isaac Lab v2.1.0 commit into
PredActor/collection/.deps/IsaacLab, installing only the 4 extensions required for collection.Install the repository's RLTracker tasks, RSL-RL runtime, and CUDA forward-kinematics library.
Pin versions throughout with
PredActor/collection/constraints.txt, then runpip check.
Success ends with PredActor collection environment is ready..
Tip If PyPI is slow, use the Alibaba Cloud mirror for Python packages. PyTorch and Isaac Sim still come from their CUDA / NVIDIA indexes:
PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple bash PredActor/collection/install.shAfter a network interruption, rerun the same command; completed downloads and Isaac Lab code are reused.
3.3 Check Inputs#
Run in the collection environment:
python PredActor/collection/scripts/collection_preflight.pyThe script checks collection code, teacher weights, and motion files, and outputs JSON. Start collection when status is PASS and motion_count is 152.
3.4 Run Collection#
bash PredActor/collection/collect_dataset.sh \
--mode deterministic \
--samples_per_motion 50 \
--num_envs 1000 \
--headlessDeterministic mode (deterministic) executes each motion from start to finish a fixed number of times: 152 motions × 50 repetitions = 7,600 episodes. Failed episodes are reassigned and excluded from the total. Results go to Artifacts/dataset/g1_152fk_raw/motion.zarr.
3.5 Collection Parameters#
| Option | Purpose | Default |
|---|---|---|
--mode |
deterministic (fixed repetitions per motion) or standard (random sampling and filtering) |
deterministic |
--samples_per_motion |
Repetitions per motion in deterministic mode | 50 |
--num_envs |
Parallel environments | 1000 |
--min_episode_length |
Minimum retained episode length | 100 |
--len_to_save |
Total steps to collect in standard mode |
1000000 |
--noise_sigma / --no_noise |
Action-noise strength (OU process) / disable noise | 0.2 / noise enabled |
--checkpoint, --motion_file, --output_dir |
Teacher policy, motion matching pattern, output directory | See Sections 3.1 and 3.4 |
--headless / --visualize |
Run without a window / open Isaac Sim | Headless |
--livestream 2 |
Use with --headless for browser viewing through WebRTC |
0 (off) |
See all options with bash PredActor/collection/collect_dataset.sh --help.
Note Once progress exceeds 90%, deterministic mode exits early if no new episode finishes for 1800 seconds, avoiding stalls on unexecutable motions. The actual total may therefore be below 7,600; check the final collection log count before training.
3.6 Use Your Own Motion Set#
Place motions at
Artifacts/motions/<motion-set>/<motion-name>/motion.npz.Add
--motion_file "<motion-set>/*"during collection. Total episodes equal matched motions multiplied by--samples_per_motion.Use the same pattern for annotation's
input.motion_pattern(Section 4.3).
4. Data Dyeing#
This section attaches a 512-dimensional, text-aligned MotionCLIP semantic vector to every collected frame as a label for text-conditioned training. The project calls this “data dyeing.” Run in the uv environment after leaving the collection environment (conda deactivate).
4.1 Preparation#
Confirm these files are in place:
Artifacts/checkpoints/motionclip/g1-model-xyz-clip/checkpoint_0100.pth.tar # MotionCLIP encoder
Artifacts/dataset/g1_152fk_raw/motion.zarr # Collection output from Section 3
Artifacts/motions/g1_152fk/*/motion.npz # Original motions4.2 Run Annotation#
uv run python PredActor/collection/scripts/data_dyeing/data_dyeing.pyResults go to Artifacts/dataset/g1_152fk/motion_dyed_text_t0.01.zarr, adding a motion_latent field with 512 dimensions per frame.
The released configuration encodes original motions, not collected samples: each original motion is encoded once, then attached to all its episodes using motion_idx. Encoding resamples 50 Hz trajectories to 30 Hz, uses 60-frame windows and xyz positions, and aligns them to the text vocabulary's CLIP vectors at temperature 0.01.
Tip The first run downloads OpenAI CLIP
ViT-B/32weights into the CLIP cache (usually~/.cache/clip) and requires internet access.
4.3 Annotation Parameters#
Append parameters as Hydra overrides, for example input.zarr_path=/path/to/motion.zarr:
| Parameter | Purpose | Default |
|---|---|---|
input.zarr_path |
Collected raw zarr | Artifacts/dataset/g1_152fk_raw/motion.zarr |
input.motion_pattern |
Original motion matching pattern | g1_152fk/* |
input.motion_base_path |
Original motion root | Artifacts/motions |
input.length_mismatch_policy |
Handle sample/original motion length mismatches: clip_or_drop, drop_all, or interpolate |
clip_or_drop |
motionclip.checkpoint_path |
MotionCLIP checkpoint | Released checkpoint_0100.pth.tar |
motionclip.device |
Encoding device | cuda |
encoding.text_alignment_temperature |
Text-alignment temperature | 0.01 |
output.zarr_path |
Output zarr | Artifacts/dataset/g1_152fk/motion_dyed_text_t0.01.zarr |
clip_or_drop truncates the original motion when the sample is shorter; when the sample is longer, it drops the episode.
5. Training#
This section behavior-clones a policy from annotated data for evaluation in Section 2's interface. Run in the uv environment from the repository root.
5.1 Train a Text-Conditioned Policy#
uv run python PredActor/train.py \
--cfg g1prdp_cond_diffuse.yaml \
--exp_name predactor_bc \
dataset_dir="$PWD/Artifacts/dataset/g1_152fk" \
dataset.zarr_path=motion_dyed_text_t0.01.zarr \
training.num_epochs=50 \
training.seed=42 \
dataloader.num_workers=16 \
logging.mode=offline \
training.save_terminal_checkpoint=trueExcept for its last line, this matches the paper-configuration training command in the repository docs. The added training.save_terminal_checkpoint=true saves final weights when training ends; see the note below.
--cfg selects a configuration under PredActor/diffusion_policy/config_files/; subsequent key=value arguments override it. logging.mode=offline logs Weights & Biases locally, while the default online requires a W&B login.
Note Training saves
checkpoints/latest.ckptevery 10 epochs, counting from epoch 0. Withouttraining.save_terminal_checkpoint=true, a 50-epoch run ends with epoch 40 weights inlatest.ckpt, not the final weights.
All configured guidance is automatically disabled during training; it applies only at inference.
5.2 Train an Unconditional Baseline#
The unconditional baseline uses the same annotated data without text conditioning:
uv run python PredActor/train.py \
--cfg g1prdp_diffuse.yaml \
--exp_name predactor_bc_unconditional \
dataset_dir="$PWD/Artifacts/dataset/g1_152fk" \
dataset.zarr_path=motion_dyed_text_t0.01.zarr \
training.seed=42 \
dataloader.num_workers=16 \
logging.mode=offlineConfiguration differences:
Text-conditioned (g1prdp_cond_diffuse.yaml) |
Unconditional (g1prdp_diffuse.yaml) |
|
|---|---|---|
| Condition per step | 96-dimensional proprioception + 512-dimensional text | 96-dimensional proprioception |
| DDIM inference steps | 5 | 2 |
| Training epochs | Set to 50 in the command (configuration default 400) | 100 in the configuration |
Use different --exp_name values to distinguish the two output directories.
5.3 Common Training Parameters#
| Parameter | Purpose | Default |
|---|---|---|
training.num_epochs |
Training epochs | 400 (100 for the unconditional configuration) |
training.seed |
Random seed | 42 |
training.device |
Training device; set to cpu for CPU training |
cuda:0 |
--gpu N |
Select GPU N | Unset |
dataloader.batch_size |
batch size | 256 |
dataloader.num_workers |
DataLoader workers | 8 |
optimizer.learning_rate |
Learning rate, with cosine decay and linear warmup over the first 10000 steps | 0.0001 |
training.checkpoint_every |
Epoch interval for saving latest.ckpt |
10 |
training.use_ema |
Maintain EMA weights | true |
training.save_terminal_checkpoint |
Save final weights when training ends | false |
dataset.load_to_memory |
Load the full dataset into RAM; set to false if memory is insufficient, at reduced speed |
true |
dataset.val_ratio |
Validation fraction | 0.02 |
logging.mode |
W&B logging: online, offline, or disabled |
online |
5.4 Training Outputs#
Training prints an output directory of the form outputs/<month-day-hour-minute-second>-<config-name>-<exp_name>/, for example outputs/October-16-22-30-05-g1prdp_cond_diffuse-predactor_bc/. It contains:
| File | Contents |
|---|---|
resolved_config.yaml |
Full configuration combining defaults and overrides; pass to evaluation's --config |
checkpoints/latest.ckpt |
Most recently saved weights; pass to --checkpoint |
logs.json.txt |
Training log |
Next, evaluate this model in the browser following Section 2.8.
6. Motion Encoder#
This section trains MotionCLIP from scratch. It maps 60-frame motions and text descriptions into a shared 512-dimensional space and is used for annotation in Section 4. This workflow is experimental; use the released encoder if you only want to reproduce policy training.
6.1 Prepare Data#
Obtain two datasets under their respective licenses:
AMASS motions retargeted to this robot's 29 joints, with one NPZ per motion;
BABEL annotations,
train.jsonandval.json.
The 152 motions in Section 1.3 are not the full encoder training dataset. Arrange files under PredActor/motion_encoder/ as follows:
PredActor/motion_encoder/
└── data/
├── g1_retargeted_amass/
│ ├── ACCAD/<subject>/<sequence>_poses_120_jpos.npz
│ ├── CMU/<subject>/<sequence>_poses_120_jpos.npz
│ └── ...
└── babel_v1.0_release/
├── train.json
└── val.jsonDirectory names and original sequence names must match BABEL's feat_p paths. For example, ACCAD/<subject>/<sequence>_poses_120_jpos.npz corresponds to BABEL's ACCAD/<subject>/<sequence>_poses.npz annotation. The numeric filename suffix may differ. Each NPZ must contain:
| Field | Shape | Meaning |
|---|---|---|
dof_positions |
(T, 29) |
Joint angles in radians |
body_positions |
(T, 30, 3) |
Rigid-body positions in world coordinates, in meters |
fps |
Scalar or single-element array | Original frame rate |
The 30 bodies must follow the order in src/datasets/g1_amass_utils.py, with the pelvis first. Isaac Lab uses a different body order, so reorder it first.
Note Preprocess trajectories to 30 Hz. The parser skips files differing from 30 Hz by more than 5 Hz; it does not convert 120 Hz to 30 Hz, and numeric filename suffixes do not indicate frame rate. Before using the public retargeted dataset mentioned in docs/motion_encoder.md, check its format against the table above. Renaming files does not convert coordinates or body order.
6.2 Parse Data#
uv sync --locked
source .venv/bin/activate
cd PredActor/motion_encoder
python src/datasets/g1_amass_parser.py \
--input_dir ./data/g1_retargeted_amass \
--output_dir ./data/g1_amass_db \
--dataset_name amass \
--babel_dir ./data/babel_v1.0_release \
--target_fps 30Subsequent commands in this section run inside PredActor/motion_encoder/. The parser includes only BABEL-annotated motions and writes three splits:
| File | Included AMASS subsets |
|---|---|
amass_30fps_train.pt |
BioMotionLab_NTroje、Eyes_Japan_Dataset、TotalCapture、KIT、ACCAD、CMU、MPI_Limits、TCD_handMocap、EKUT |
amass_30fps_vald.pt |
HumanEva、MPI_HDM05、SFU、MPI_mosh |
amass_30fps_test.pt |
Transitions_mocap、SSM_synced |
Empty splits are not saved. Use a new output directory when regenerating.
6.3 Check Training Data#
python - <<'PY'
from src.datasets.g1_amass import G1AMASS
dataset = G1AMASS(
datapath='./data/g1_amass_db/amass_30fps_db.pt',
split='train', use_g1=True, num_frames=60, pose_rep='xyz')
print('Dataset size:', len(dataset))
print('Sample shape:', dataset[0]['inp'].shape) # Expected: [30, 3, 60]
print('Caption:', dataset[0]['clip_text'])
PYamass_30fps_db.pt is a loader placeholder, automatically replaced with _train.pt, _vald.pt, or _test.pt; do not create it. The loader divides sequences into 100-frame chunks and samples 60 consecutive frames per training example, so sequences shorter than 100 frames produce no training samples.
6.4 Run Training#
First run a smoke check, saving outputs to a separate directory:
bash scripts/train_g1_xyz.sh \
--folder ./exps/g1-xyz-smoke \
--num_epochs 1 --snapshot 1 --batch_size 2 --max_steps 1Smoke checks execution, not model quality. At least two samples with different descriptions are needed for a meaningful text–motion contrastive loss.
Full training (alternatively, without activating the environment, run uv run --locked bash PredActor/motion_encoder/scripts/train_g1_xyz.sh from the repository root):
bash scripts/train_g1_xyz.shThe script follows the original recipe: 100 epochs, batch size 20, learning rate 1e-4, an 8-layer Transformer, 512-dimensional latent space, 16 DataLoader workers, and saves every 10 epochs. The motion model starts from random initialization and the CLIP text tower is trained jointly; the released encoder is not loaded. The first run downloads CLIP ViT-B/32 weights.
After completion, exps/g1-model-xyz-clip/ contains checkpoint_0100.pth.tar, opt.yaml, training.log, TensorBoard event files, and training_receipt.json. The checkpoint includes the motion model and trained CLIP weights, without optimizer state.
6.5 Annotate with the New Encoder#
Return to the repository root and pass the new checkpoint to Section 4's annotation script:
uv run --locked python PredActor/collection/scripts/data_dyeing/data_dyeing.py \
motionclip.checkpoint_path=PredActor/motion_encoder/exps/g1-model-xyz-clip/checkpoint_0100.pth.tarThen retrain the policy following Section 5.
Note Evaluation text must be encoded with the same encoder used to annotate training data. At training startup,
resolved_config.yamlrecords the evaluation encoder path, defaulting to the released MotionCLIP checkpoint. When training on data annotated with your new encoder, append the following to the Section 5 training command:env_runner.task_cond_providers.clip_teleop.checkpoint_path=PredActor/motion_encoder/exps/g1-model-xyz-clip/checkpoint_0100.pth.tar, This records the new encoder path in training outputs so Section 2.8's evaluation command loads it.