PhiZero is a world model characterized by reasoning about future dynamics in a discrete "physical language" before rendering video. This repository is the official implementation of PhiZero, and the paper authors include Shuyao Shang, Yuqi Wang, Ruopeng Gao, Xu Chen, Tieniu Tan, Lue Fan, Zhaoxiang Zhang.
Purpose and Overall Approach PhiZero aims to enable the model to use discrete physical language symbols as an intermediate representation to reason about future dynamics, and then render the reasoning results as video through a diffusion decoder. The repository provides a complete pipeline from tokenizer training to reasoner training, and then to inference, motion transfer, and reconstruction.
Main Capabilities and Pipeline
- Physical language tokenizer training: Using a video reconstruction objective, jointly optimize the physical language tokenizer, inverse FSQ/context conditioner, and DiT LoRA, while freezing the Wan base DiT and VAE. The training data consists of 4-second, 8 FPS clips; the loader takes the first 33 frames and deterministically scales them to 896x512, without random cropping, temporal sampling, color transformations, Cosmos augmentation, or other data augmentation.
- Physical language ground-truth export: After tokenizer training is complete, use a tokenizer-only exporter to export ground truth from captioned 33-frame videos, generating outputs/physical_language_gt/train.jsonl, where each assistant target is <bom> + 256 adjacent <m_i> symbols + <eom>.
- Physical language reasoner training: Use the JSONL generated in the previous step to perform full-parameter SFT on Qwen3-VL. The reasoner forward pass does not involve the tokenizer and diffusion decoder. The repository provides an ms-swift launch script and supports building a 25,002-token atomic vocabulary containing <bom>, <eom>, and <m_0> to <m_24999>.
- Source-domain adaptation: Before motion transfer, adapt using videos from the domain that provides the motion source, for example, human-hand videos for human-to-hand transfer, or simulated robot videos for sim-to-real transfer. If there is no larger-scale domain-matched data, simply using the source videos themselves is sufficient.
- Inference example: data/inference_cases/cases.json contains 19 entries, each with only an ID, a relative first-frame path, and a fixed prompt. The released inference entry point only reads this manifest and its 19 images and saidPlaintext, does not accept external images, prompts, manifests, or output directories.
- Motion transfer: provides 3 egocentric-to-dexterous-robot, 4 human-to-robot, and 4 sim-to-real cases. Outputs include 256-symbol arrays under outputs/motion_transfer/physical_language/, and 33-frame videos under outputs/motion_transfer/videos/.
- Reconstruction: data/reconstruction/cases.json lists 6 33-frame source videos; the tokenizer extracts physical language, and the decoder renders from the source video's own first frame, outputting 256 symbols and 896x512, 33-frame, 8 FPS videos.
- Physics-IQ Verified: the repository provides benchmark-related instructions; you need to request access to the gated dataset and log in before downloading the data, and the upstream scorer verifies 30 FPS source videos.
Usage This repository provides environment creation commands to create the reasoner and decoder environments separately, and requires downloading the Wan2.2 base weights (three official Wan2.2-TI2V-5B DiT shards and the DiffSynth-converted VAE). You can point to local files via PHIZERO_DIT_PATHS and PHIZERO_VAE_PATH. The inference, training, and benchmark launchers all use these variables. The DiT shards are about 20 GB, and the VAE is about 1.4 GB. If these variables are not set, DiffSynth can automatically resolve the same base model. The training workflow follows a fixed dependency order: first train or fine-tune the physical language tokenizer, then freeze the tokenizer and extract physical language ground truth, then train the physical language reasoner on the exported JSONL, then perform source-domain adaptation, and finally run inference, reconstruction, or motion transfer. After changing the tokenizer used by the reasoner, the physical language targets must be regenerated.
Applicable scenarios and limitations Suitable for video world model research, video reconstruction, motion transfer (such as human-to-robot and sim-to-real), and physical understanding benchmarks. In terms of limitations: the released inference entry point only reads fixed manifests within the repository; the tokenizer.safetensors in the checkpoint is a generic initialization checkpoint and cannot be directly used for robot-domain or sim-to-real motion transfer, and must first be fine-tuned with same-domain source videos; it requires substantial GPU resources, and the original SFT used 8 nodes x 8 GPUs.
Other information The repository states that the code and checkpoints will be released soon. For related questions, suggestions, or sharing results, you can contact Shuyao Shang, email shangshuyao2024@ia.ac.cn, WeChat 17315710019, and you are also welcome to report issues or request features via GitHub issues. Regarding facts such as fees, pricing, platform, and specific results, the current materials do not yet provide them.