Official codebase for Enfold: Folding World Model Imagination into Predictive Representations for Ultra-Efficient Embodied Control
| Method | P.T. | Model Size | Latency (ms) | Long | Goal | Object | Spatial | Average |
|---|---|---|---|---|---|---|---|---|
| OpenVLA-OFT | ✓ | 7B | - | 94.5 | 97.9 | 98.4 | 97.6 | 97.1 |
| π0 | ✓ | 3.5B | 184 | 88.4 | 94.4 | 96.8 | 98.0 | 94.4 |
| π0.5 | ✓ | 3.5B | 184 | 92.4 | 98.0 | 98.2 | 98.8 | 96.9 |
| GR00T-N1.6 | ✓ | 3.3B | 232 | 94.4 | 97.5 | 98.5 | 97.7 | 97.0 |
| LAPA | ✓ | 7B | - | 55.4 | 58.8 | 74.6 | 73.8 | 65.7 |
| UniVLA | ✓ | 7B | - | 92.0 | 95.6 | 96.8 | 96.5 | 95.2 |
| Mantis | ✓ | 5.8B | - | 94.2 | 94.4 | 99.2 | 98.8 | 96.7 |
| VLA-JEPA | ✗ | 3B | - | 95.8 | 97.2 | 99.6 | 96.2 | 97.2 |
| F1 | ✗ | 4B | 352 | 91.3 | 95.4 | 97.8 | 98.2 | 95.7 |
| Motus | ✗ | 8B | 2759 | 97.6 | 96.6 | 99.8 | 96.8 | 97.7 |
| Cosmos-Policy | ✗ | 2.1B | 1133 | 97.6 | 98.2 | 100.0 | 98.1 | 98.5 |
| LingBot-VA | ✗ | 5.5B | 3812 | 98.5 | 97.2 | 99.6 | 98.5 | 98.5 |
| Fast-WAM | ✗ | 6B | 493 | 95.2 | 97.0 | 100.0 | 98.2 | 97.6 |
| Enfold | ✗ | 3B | 134 | 97.4 | 96.8 | 100.0 | 97.0 | 97.8 |
| Enfold-Flash | ✗ | 3B | 49 | 96.6 | 96.6 | 99.8 | 97 .0 | 97.5 |
| Method | P.T. | Clean | Randomized | Average |
|---|---|---|---|---|
| π0 | ✓ | 65.92 | 58.40 | 62.16 |
| π0.5 | ✓ | 82.74 | 76.76 | 79.75 |
| ABot-M0 | ✓ | 81.20 | 80.40 | 80.80 |
| Motus | ✓ | 88.65 | 87.02 | 87.83 |
| LingBot-VA | ✓ | 92.90 | 91.50 | 92.20 |
| Fast-WAM | ✗ | 91.88 | 91.78 | 91.83 |
| Enfold | ✗ | 91.60 | 91.94 | 91.77 |
| Enfold-Flash | ✗ | 91.96 | 92.08 | 92.02 |
| Task | In-Distribution | OOD | Perturbation |
|---|---|---|---|
| Fold Tower | fold_tower.mp4 |
fold_tower_ood.mp4 |
fold_tower_perturbation.mp4 |
| Organize Desktop | organize_desktop.mp4 |
organize_desktop_ood.mp4 |
organize_desktop_perturbation.mp4 |
| Spoon Powder | spoon_powder.mp4 |
spoon_powder_ood.mp4 |
spoon_powder_perturbation.mp4 |
| Store Plate | store_plate.mp4 |
store_plate_ood.mp4 |
store_plate_perturbation.mp4 |
Enfold/
├── configs/
│ ├── data/ # LIBERO and RoboTwin dataset configs
│ ├── model/enfold.yaml # Cosmos, DINOv3, and ActionDiT configs
│ ├── task/ # Task-level training configs
│ ├── sim_libero.yaml # LIBERO evaluation config
│ └── sim_robotwin.yaml # RoboTwin evaluation config
├── scripts/
│ ├── train.py
│ ├── initialize_action_dit.py
│ └── precompute_text_embeds.py
├── experiments/
│ ├── libero/ # LIBERO evaluation manager and workers
│ └── robotwin/ # RoboTwin evaluation manager and policy
├── src/enfold/ # Core implementation
├── third_party/
│ ├── cosmos-predict2.5/ # Cosmos-Predict2.5 third-party library
│ └── RoboTwin/ # Vendored RoboTwin evaluation integration
├── checkpoints/ # External and generated model weights
├── data/ # Datasets and text-embedding caches
├── runs/ # Training outputs
└── evaluate_results/ # Evaluation outputs
Before training and inference, download and prepare the following external resources:
- Video backbone: Cosmos-Predict2.5-2B and the Cosmos tokenizer
- Text encoders: Cosmos-Reason1-7B and Qwen2.5-VL-7B-Instruct
- Vision encoder: DINOv3 ViT-H/16+
The default paths are specified in configs/model/enfold.yaml. If you use a different local directory layout, modify the corresponding configuration fields.
checkpoints/
├── 81edfebe-bd6a-4039-8c1d-737df1a790bf_ema_bf16.pt # Cosmos-Predict2.5-2B base post-trained
├── tokenizer.pth # Cosmos tokenizer / VAE
├── Cosmos-Reason1-7B/ # Cosmos text-encoder checkpoint
├── Qwen2.5-VL-7B-Instruct/ # Qwen tokenizer and model assets
└── dinov3-vith16plus/ # DINOv3 ViT-H/16+ checkpoint
The default configuration fields are:
| Component | Config field |
|---|---|
| Cosmos teacher | model.video_dit_config.cosmos.checkpoint_path |
| Cosmos tokenizer / VAE | model.video_dit_config.cosmos.tokenizer_vae_pth |
| Cosmos-Reason1 and Qwen assets | model.video_dit_config.cosmos.text_embedding_* |
| DINOv3 student | model.student_config.model_id |
Enfold follows Fast-WAM's dataset-preparation procedure and uses the same preprocessed, LeRobot-format LIBERO and RoboTwin datasets.
The preprocessed LIBERO dataset is available at:
Download all compressed files first, then extract them together:
mkdir -p data/libero_mujoco3.3.2
cd data/libero_mujoco3.3.2
# Run after downloading all four tar.gz files.
for f in *.tar.gz; do
tar -xzf "$f"
doneThe extracted directory structure should be:
data/libero_mujoco3.3.2/
├── libero_10_no_noops_lerobot/
├── libero_goal_no_noops_lerobot/
├── libero_object_no_noops_lerobot/
└── libero_spatial_no_noops_lerobot/
The preprocessed RoboTwin dataset is available at:
Download all split archives first, then concatenate and extract them:
mkdir -p data/robotwin2.0
cd data/robotwin2.0
# Run after downloading all robotwin2.0.tar.gz.part-* files.
cat robotwin2.0.tar.gz.part-* | tar -xzf -The extracted directory structure should be:
data/robotwin2.0/
└── robotwin2.0/
├── data/
├── meta/
└── videos/
Keep data/robotwin2.0/dataset_stats.json at the dataset root so the current RoboTwin configuration can use it directly. You can also recompute this file when using a new dataset.
conda create -n enfold python=3.10 -y
conda activate enfold
pip install -U pip
pip install torch==2.7.0+cu128 torchvision==0.22.0+cu128 \
--extra-index-url https://download.pytorch.org/whl/cu128
pip install -e .
# Install Cosmos-Predict2.5 dependencies into the current conda environment.
cd third_party/cosmos-predict2.5
# Run the following two lines first if uv is not installed.
curl -LsSf https://astral.sh/uv/install.sh | sh
source "${HOME}/.local/bin/env"
VIRTUAL_ENV="$CONDA_PREFIX" uv sync --extra=cu128 --active --inexact --python "$CONDA_PREFIX/bin/python"Before training, initialize the ActionDiT backbone using the configured Cosmos teacher.
# RoboTwin
bash init_action.sh robotwin --output checkpoints/action_dit_cosmos_init_robotwin.pt
# LIBERO
bash init_action.sh libero --output checkpoints/action_dit_cosmos_init_libero.ptDuring subsequent training, pass the initialization file corresponding to the benchmark through model.action_dit_pretrained_path.
Precompute the Cosmos-Reason1 text-embedding cache before training:
# LIBERO
python scripts/precompute_text_embeds.py task=enfold_libero
# RoboTwin
python scripts/precompute_text_embeds.py task=enfold_robotwinExample of distributed preprocessing:
torchrun --standalone --nproc_per_node=8 \
scripts/precompute_text_embeds.py task=enfold_liberoThe launcher in the repository root maps benchmark names to the corresponding Hydra task configurations:
# Single node, eight GPUs: LIBERO
bash train.sh libero 8 \
model.action_dit_pretrained_path=checkpoints/action_dit_cosmos_init_libero.pt
# Single node, eight GPUs: RoboTwin
bash train.sh robotwin 8 \
model.action_dit_pretrained_path=checkpoints/action_dit_cosmos_init_robotwin.ptYou can append other Hydra overrides directly:
bash train.sh robotwin 8 \
model.action_dit_pretrained_path=checkpoints/action_dit_cosmos_init_robotwin.pt \
model.video_dit_config.use_gradient_checkpointing=trueFor multi-node training, run the following command on every node with its corresponding NODE_RANK:
NNODES=4 NODE_RANK=0 MASTER_ADDR=<rank0-host> MASTER_PORT=29500 \
bash scripts/train_zero1_multinode.sh 8 \
task=enfold_robotwin \
model.action_dit_pretrained_path=checkpoints/action_dit_cosmos_init_robotwin.ptTraining outputs, including checkpoints and generated dataset statistics, are saved in runs/<task>/<run_id>/.
Inference requires a trained checkpoint and its matching dataset_stats.json. Creating a separate environment for inference is recommended to avoid conflicts with training or other benchmark dependencies; all external resources should still be placed as described in Model Preparation.
conda create -n enfold_libero python=3.10 -y
conda activate enfold_libero
pip install -U pip
pip install torch==2.7.0+cu128 torchvision==0.22.0+cu128 \
--extra-index-url https://download.pytorch.org/whl/cu128
pip install -e .Install LIBERO according to the official LIBERO documentation, then run the commands below. The MuJoCo version should remain consistent with the LIBERO data version.
pip install mujoco==3.3.2Install the Cosmos dependencies after installing the LIBERO dependencies.
# Install Cosmos-Predict2.5 dependencies.
cd third_party/cosmos-predict2.5
# Run the following two lines first if uv is not installed.
curl -LsSf https://astral.sh/uv/install.sh | sh
source "${HOME}/.local/bin/env"
VIRTUAL_ENV="$CONDA_PREFIX" uv sync --extra=cu128 --active --inexact --python "$CONDA_PREFIX/bin/python"Evaluate all configured LIBERO suites:
bash eval.sh libero <checkpoint.pt> <dataset_stats.json> \
MULTIRUN.num_gpus=8 MULTIRUN.max_tasks_per_gpu=1To use fewer GPUs, reduce MULTIRUN.num_gpus. Results are written to evaluate_results/libero/ by default.
conda create -n enfold_robotwin python=3.10 -y
conda activate enfold_robotwin
pip install -U pip
pip install torch==2.7.0+cu128 torchvision==0.22.0+cu128 \
--extra-index-url https://download.pytorch.org/whl/cu128
pip install -e .
# Install Cosmos-Predict2.5 dependencies.
cd third_party/cosmos-predict2.5
# Run the following two lines first if uv is not installed.
curl -LsSf https://astral.sh/uv/install.sh | sh
source "${HOME}/.local/bin/env"
VIRTUAL_ENV="$CONDA_PREFIX" uv sync --extra=cu128 --active --inexact --python "$CONDA_PREFIX/bin/python"Prepare the RoboTwin environment according to the official RoboTwin installation guide. After installing the RoboTwin environment, restore the versions used by this evaluation workflow:
pip install huggingface-hub==0.36.0
pip install torch==2.7.0+cu128 torchvision==0.22.0+cu128 \
--extra-index-url https://download.pytorch.org/whl/cu128This repository contains only the RoboTwin evaluation integration and does not include the required assets. Download them according to the official documentation, place them under third_party/RoboTwin/assets, and then create the following link:
ln -sfn "$(pwd)/experiments/robotwin/enfold_policy" \
"$(pwd)/third_party/RoboTwin/policy/enfold_policy"Evaluate RoboTwin:
bash eval.sh robotwin <checkpoint.pt> <dataset_stats.json> \
MULTIRUN.num_gpus=8 MULTIRUN.max_tasks_per_gpu=1 \
EVALUATION.replan_steps=24Evaluation metrics may vary with the simulation environment. We recommend trying different replan_steps values, such as 24 or 32.
We provide a TensorRT export script that exports the Action and Student modules to ONNX models and then builds the corresponding TensorRT engines. The command is as follows:
python scripts/export_robotwin_dino_student_action_onnx.py \
--ckpt <checkpoint.pt> \
--task <task_config> \
--action-onnx outputs/action.onnx \
--student-onnx outputs/student.onnx \
--action-engine outputs/action.trt \
--student-engine outputs/student.trt \
--action-horizon 32After export, enable TensorRT inference by providing the engine paths during RoboTwin evaluation:
bash eval.sh robotwin <checkpoint.pt> <dataset_stats.json> \
MULTIRUN.num_gpus=8 MULTIRUN.max_tasks_per_gpu=1 \
EVALUATION.replan_steps=24 \
+EVALUATION.action_trt_path=outputs/action.trt \
+EVALUATION.student_trt_path=outputs/student.trtThis work builds on Fast-WAM. We also thank the teams behind Cosmos-Predict2.5, RoboTwin, LIBERO, and DINOv3 for their open-source work.
If you find our work helpful, please consider citing::
@misc{zeng2026enfoldfoldingworldmodel,
title={Enfold: Folding World Model Imagination into Predictive Representations for Ultra-Efficient Embodied Control},
author={Weili Zeng and Yitong Xing and Fulong Liu and Chengqun Yang and Antao Xiang and Feng Tian and Jingnan Gao and Jisong Cai and Xin Wang and Xiaomin Wu and Yao Mu and Xiaokang Yang and Yichao Yan},
year={2026},
eprint={2607.26657},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2607.26657},
}