Skip to content

About

Official implementation of WorldReforge.

Resources

Stars

9 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

WorldReforge logo and wordmark

Beyond the Happy Path: Generalizing Robot World Models from Simulated Failures

Zhiyue Zhao1,2,*, Mingyu Liu1,2,*, Bolin Zhang1, Liyang Li1, Guangyu Huang1, Canyu Zhao1, Jinchuan Shi1,
Haokai Zhang1, Hao Chen1,†, Chunhua Shen1,†

1 Zhejiang University    2 Shanghai Innovation Institute
* Equal contribution.    † Corresponding authors.

Homepage arXiv Hugging Face Model Hugging Face Data


Overview

Official code for Beyond the Happy Path: Generalizing Robot World Models from Simulated Failures. WorldReforge teaches video world models to predict the physical consequences of robot-object interactions through post-training on simulated failures with physical supervision. This repository provides inference and evaluation code for Cosmos3 Nano WorldReforge and the original pretrained Cosmos3 Nano baseline.

WorldReforge: interaction experience, physical supervision, and predicted consequences.


📣 Updated News


Installation

Install WorldReforge in a CUDA-enabled NVIDIA Cosmos Framework environment with Cosmos3 Nano support:

python -m pip install -e .

Tested with Cosmos Framework 1.2.2, PyTorch 2.10.0 (CUDA 12.8), Transformers 4.57.6, tokenizers 0.22.2, and huggingface-hub 0.36.0.

For motion metrics, install CoTracker3 and its scaled offline checkpoint from the repository root:

mkdir -p third_party models
git clone https://github.com/facebookresearch/co-tracker.git third_party/co-tracker
python -m pip install -e third_party/co-tracker
curl --fail --location \
  --output models/cotracker3_offline.pth \
  https://huggingface.co/facebook/cotracker3/resolve/main/scaled_offline.pth

Skip the clone command if third_party/co-tracker already exists.


Model and Data

Resource Description Status
Model Cosmos3 Nano WorldReforge Hugging Face
Pretrained model Original Cosmos3 Nano NVIDIA checkpoint
Data Reforge-Eval input images, measured states, reference videos, and motion labels Uploading to Hugging Face

The Reforge-Eval manifest contains 1,200 simulation windows, each with one conditioning frame and 16 future frames. See Input format for file and state conventions, and artifacts.json for release information.

Place downloaded models, dependencies, and data in these directories:

WorldReforge/
├── models/
│   ├── Cosmos3-Nano/
│   ├── nano-worldreforge/
│   ├── Wan2.2_VAE.pth
│   ├── Qwen3-VL-8B-Instruct-tokenizer/
│   └── cotracker3_offline.pth
├── data/
│   └── reforge-eval/
│       └── samples/
│           └── <id>/
├── third_party/
│   └── co-tracker/
└── outputs/

Keep each checkpoint's configuration, weight index, subdirectories, and shards together. Both Nano models use the same VAE and Qwen3-VL-8B-Instruct text tokenizer; only the tokenizer files are needed, not Qwen model weights.


Evaluation

Run inference and evaluation on one GPU from the repository root:

bash scripts/evaluate.sh \
  --manifest manifests/eval1200.jsonl --data-root data/reforge-eval \
  --checkpoint models/nano-worldreforge --tokenizer models/Wan2.2_VAE.pth \
  --text-tokenizer models/Qwen3-VL-8B-Instruct-tokenizer \
  --tracker-repository third_party/co-tracker \
  --tracker-checkpoint models/cotracker3_offline.pth \
  --gpu 0 --batch-size 1 --cpu-workers 8 --output outputs/reforge-eval

--gpu selects a device within CUDA_VISIBLE_DEVICES; --cpu-workers sets scoring parallelism. Increase --batch-size if memory permits, and use a fresh --output directory. For image metrics only, add --pixels-only and omit the tracker arguments.

Metrics include object/gripper ADE and FDE, PSNR, SSIM, and pixel errors; see Evaluation metrics for definitions and aggregation.

Output Contents
inference/predictions/<id>/prediction.npy Lossless predicted frames
evaluation/metrics/cases/ Per-video metrics
evaluation/metrics/summary.json Overall and subgroup averages
evaluation/checks/results.json Coverage and consistency checks

The run writes COMPLETE.json after validation, or stops with FAILED.json on failure.

Original Nano baseline. Generate predictions with the pretrained checkpoint:

bash scripts/infer_original.sh \
  --manifest manifests/eval1200.jsonl --data-root data/reforge-eval \
  --tokenizer models/Wan2.2_VAE.pth \
  --text-tokenizer models/Qwen3-VL-8B-Instruct-tokenizer \
  --gpu 0 --batch-size 1 --output outputs/nano-original/inference

This inference-only shortcut defaults to models/Cosmos3-Nano/ and uses the same inference settings as WorldReforge. For inference and evaluation, use the scripts/evaluate.sh command above with --checkpoint models/Cosmos3-Nano and --output outputs/nano-original-eval.


License

WorldReforge code is released under the Apache License 2.0. Third-party software, model weights, and datasets are governed by their respective licenses.


Acknowledgments

We thank the teams behind NVIDIA Cosmos Framework, RoboLab, and CoTracker for their open-source contributions.

About

Official implementation of WorldReforge.

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages