--- pretty_name: Fiction v1 RoboTwin six-reference training pairs size_categories: - 100K WAP project overview

World-as-Prompt (WAP)

Fiction v1 · RoboTwin training pairs with six appearance references per target

arXiv 2612.03472 Project page Code on GitHub Model on Hugging Face

This dataset pairs a clean RGB target view from RoboTwin with a scene description, a clean appearance reference and the current randomized scene's depth. The release contains **222,324 pretokenized examples from 37,054 distinct target frames**. Each target is paired with five first-frame references from other training trajectories and one first-frame reference from its own trajectory. These pairs were used in the second stage of training for Fiction v1. The code repository includes an example that renders an observation from RGB and depth PNGs using the released checkpoint. ![Scene appearance annotation, independent review and quality control in the World-as-Prompt paper](https://raw.githubusercontent.com/EmbodiedCity/WAP.code/main/docs/assets/data-pipeline.png) The figure shows the paper’s overall annotation and review process. Scene descriptions cover the workspace, objects, lighting and background, then undergo independent review and manual spot checks. This repository distributes the pretokenized RoboTwin reference–target pairs. ## Splits and layout - **Train.** 217,632 reference–target pairs, covering 36,272 distinct target frames. The eight ranks each store a different 27,204-record subset, assigned round-robin in source order. - **Eval.** 4,692 held-out reference–target pairs, covering 782 distinct target frames. Each rank contains a copy of the full evaluation split. Count it once. Entire trajectories were assigned to splits, and external reference frames were drawn from training trajectories. - **Files.** `rank-00.pt` through `rank-07.pt` contain the records. `manifest.json` gives their individual SHA-256 digests, record counts, condition contract and rank-assignment rule. Each shard contains 31,896 entries when its local training records and replicated evaluation records are counted together. The evaluation split here is for frame prediction. The project's closed-loop policy benchmark is a separate set of episodes. ## Inspect one shard ```python from collections import Counter from huggingface_hub import hf_hub_download import torch path = hf_hub_download( repo_id="EmbodiedCity/WAP", repo_type="dataset", filename="rank-00.pt" ) shard = torch.load(path, map_location="cpu", weights_only=True, mmap=True) records = shard["records"] print(Counter(row["split"] for row in records)) # train: 27204, eval: 4692 row = next(r for r in records if r["split"] == "train") print(row["id"], row["target_frame_id"], row["reference_episode_id"]) print(row["prefix_ids"].shape, row["target_ids"].reshape(15, 60).shape) ``` Each file is a PyTorch dictionary with `records` and `metadata`. Use a recent PyTorch version that supports `weights_only` and `mmap`. To reconstruct the logical training split, take the `train` entries from all eight files. To inspect the held-out split, take the `eval` entries from any one file. ## Record fields - `id` identifies the pairing. `target_frame_id` groups the six examples for one target. `episode_id`, `reference_episode_id`, `split`, `split_group` and `reference_selection` describe provenance and assignment. - `prefix_ids` contains the variable-length conditioned UNIS token sequence. `uncond_ids` contains the corresponding unconditional prefix. Both are one-dimensional `torch.int64` tensors. - `target_ids` contains 900 flattened visual token IDs in model vocabulary space, including the visual-token offset. `height=15` and `width=60` give the target grid shape. Training applies token-level cross-entropy to the clean RGB target. - `condition_contract` describes the inputs and geometry. `ref`, `depth` and `gt` retain source locators. `prompt_sha256`, `sample_binding_sha256` and `token_cache_ids` identify the prompt, pairing and cached inputs. Original HDF5 paths in the provenance refer to the preparation environment. Reading the released token tensors does not require those HDF5 files. ## Camera and depth conventions The conditioning order is **text → clean reference RGB → current depth**. Each visual input and the clean target use a 960 × 240 canvas, ordered left to right as `top_camera`, `left_arm_camera`, `right_arm_camera`. The frozen IBQ vision tokenizer maps each canvas to a 15 × 60 grid. For valid depth the 8-bit encoding is `round(255 * clip(1 - depth_mm / 1000, 0, 1))`. Invalid samples are zero. The six references create multiple training examples for the same geometry and target. When measuring generalization, keep the split by trajectory and report whether results count frame targets or individual reference pairings. This release contains simulated observations and compiled training tokens. The public code repository includes sample PNG inputs for image-level inference. [Example inputs](https://github.com/EmbodiedCity/WAP.code/tree/main/examples) ## Citation ```bibtex @misc{fang2026worldasprompt, title = {{World-as-Prompt}: Rewriting Robot Observations for Robust Policy Execution}, author = {Fang, Jianjie and Wang, Ziyou and Zheng, Yichun and Wang, Zhaolu and Tang, Rongze and Xu, Jiacheng and Liu, Xvyuan and Gao, Chen and Wu, Wei and Chen, Xinlei and Li, Yong}, year = {2026}, eprint = {2612.03472}, archivePrefix = {arXiv}, primaryClass = {cs.AI}, url = {https://arxiv.org/abs/2612.03472} } ```