Views
No views yet
fastwam policy:pip install "lerobot[fastwam]@git+https://github.com/huggingface/lerobot.git"select_action1import torch
2
3from lerobot.policies.fastwam.modeling_fastwam import FastWAMPolicy
4
5model_id = "<namespace>/fastwam-libero-uncond-2cam224"
6device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
7
8policy = FastWAMPolicy.from_pretrained(model_id, strict=False).to(device).eval()
9
10batch = {
11 "observation.images.image": torch.zeros(1, 3, 224, 448, device=device),
12 "observation.state": torch.zeros(1, 8, device=device),
13 "prompt": "pick up the object and place it at the target location",
14}
15
16with torch.inference_mode():
17 action = policy.select_action(batch)
18
19print(action.shape)FastWAMPolicy.from_pretrained(...) loads the policy weights and the local Wan sidecar components
from this same repository snapshot.forward(...) and use the returned loss key:1policy.train()
2
3outputs = policy.forward(batch)
4loss = outputs["loss"]
5loss.backward()video, action, context, and
context_mask, or LeRobot observation/action keys that can be adapted by the policy wrapper.1lerobot-train \
2 --dataset.repo_id=<your-libero-style-dataset> \
3 --output_dir=./outputs/fastwam_finetune \
4 --job_name=fastwam_finetune \
5 --policy.type=fastwam \
6 --policy.path=<namespace>/fastwam-libero-uncond-2cam224 \
7 --policy.device=cuda \
8 --steps=100000 \
9 --batch_size=11lerobot-eval \
2 --policy.path=<namespace>/fastwam-libero-uncond-2cam224 \
3 --env.type=libero \
4 --env.task=libero_spatial \
5 --eval.batch_size=1 \
6 --eval.n_episodes=20FastWAMPolicy.from_pretrained(...):1config.json
2model.safetensors
3policy_preprocessor.json
4policy_preprocessor_step_3_normalizer_processor.safetensors
5policy_postprocessor.json
6policy_postprocessor_step_0_unnormalizer_processor.safetensors
7Wan2.2_VAE.safetensors
8models_t5_umt5-xxl-enc-bf16.safetensors
9google/umt5-xxl/
10libero_uncond_2cam224_dataset_stats.jsontoggle_action_dimensions: [-1] to match the
LeRobot LIBERO gripper action convention.config.json, model.safetensors, and local Wan sidecar files. Original FastWAM .pt
checkpoint loading is not required.