mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 10:16:09 +00:00
feat(lingbot_va): RoboTwin eef-pose eval, single-file model, Hub checkpoints
Make the LingBot-VA port runnable on both LIBERO and RoboTwin and clean up the package to LeRobot conventions. - Consolidate all vendored Wan2.2 model code (transformer, attention, VAE helpers, flow-matching scheduler, grid utils, flex-attention) into a single modeling_lingbot_va.py; remove the separate wan_*/schedulers modules. - Move the fixed action (un)normalization quantiles out of the config and into the post-processor (LIBERO 7-DoF + RoboTwin 16-d eef); remove the conversion script in favour of ready-to-use LeRobot-format checkpoints on the Hub. - Fixes found via on-sim validation: undo LIBERO's 180-degree image flip (image_hflip), encode obs as a multi-frame streaming-VAE clip, reset the streaming VAE cache between episodes, run the transformer in config.dtype, lazy-load frozen VAE/UMT5 by subfolder with the text encoder on CPU. - RoboTwin: add an end-effector-pose action mode to RoboTwinEnv (16-d per-arm xyz+quat+gripper deltas composed onto the initial eef pose, executed via CuRobo IK) and the robotwin_tshape latent layout (full-res head + half-res wrists via a second streaming VAE) with the upstream RoboTwin action quantiles + camera mapping. - Predicted-video saving works for both benchmarks; docs + tests updated. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
Maxime Ellerbach
parent
d600a52943
commit
b81909fc28
@@ -36,17 +36,3 @@ def test_get_policy_class_resolves_lazily() -> None:
|
||||
cls = get_policy_class("lingbot_va")
|
||||
assert cls.name == "lingbot_va"
|
||||
assert cls.config_class is LingBotVAConfig
|
||||
|
||||
|
||||
def test_convert_build_config_libero() -> None:
|
||||
pytest.importorskip("diffusers")
|
||||
from lerobot.policies.lingbot_va.convert_lingbot_va_checkpoints import build_config
|
||||
|
||||
cfg = build_config("libero", wan_pretrained_path="dummy/path", dtype="float32")
|
||||
assert cfg.height == 128 and cfg.width == 128
|
||||
assert cfg.used_action_channel_ids == list(range(7))
|
||||
# validate_features (called inside build_config) must have populated the action feature.
|
||||
from lerobot.utils.constants import ACTION
|
||||
|
||||
assert cfg.output_features[ACTION].shape == (7,)
|
||||
assert len(cfg.obs_cam_keys) == 2
|
||||
|
||||
Reference in New Issue
Block a user