SuperAPIAI Directory

open-dreamer

github.com · AI developer platforms

Open Dreamer is an open-source JAX/Flax (NNX) implementation of the Dreamer 4 world model, focused on training and running a world model in real time on Minecraft/VPT-style game data. The repository provides the complete training pipeline code: including a causal video tokenizer, an action-conditioned latent dynamics model, and tools for generating rollouts and computing the FVD quality metric. Users can train the tokenizer, tokenize a Minecraft/VPT-style MP4 dataset, train the latent dynamics model, generate videos, and evaluate FVD. The project also provides a real-time demo in the browser, where you can enter a generated Minecraft world and, via the Game ⟷ Dream toggle, transition frame by frame between real gameplay footage and model-generated footage.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

Open Dreamer is an open-source real-time implementation of the Dreamer 4 world model pipeline, written in JAX/Flax. The repository mainly hosts the complete training pipeline, including a causal video tokenizer, an action-conditioned latent dynamics model, and tools for generating rollouts and measuring quality (FVD).

Main capabilities and workflow The repository currently supports the following features: training a causal video tokenizer; tokenizing a Minecraft/VPT-style MP4 dataset; training an action-conditioned latent dynamics model; generating rollouts and computing FVD. The overall training workflow is: prepare raw MP4 ArrayRecord shards, train the tokenizer on raw video clips, tokenize full episodes into latent ArrayRecords, copy the generated latent statistics into the latent dataset configuration, then train the dynamics model on latent episodes and actions, and finally generate videos and compute FVD.

How to use The fastest way to experience Open Dreamer is to use the real-time demo in the browser, with no local setup required, as the real-time model runs on the cloud Reactor. The demo provides a Game ⟷ Dream toggle that can hand over the data stream frame by frame from the real game to the world model. To run a trained model locally on your own videos and actions, the official guidance is to use the inference repository reactor-team/open-dreamer. The rest covers how to train a model from scratch.

Environment requirements and data preparation A JAX environment compatible with CUDA 12 is required. The dependency lock targets CUDA 12 JAX; if the machine needs a different JAX build, you should install the wheel suitable for your accelerator setup after syncing. Training requires Minecraft/VPT-style ArrayRecord data, with raw shards named shard-*.array_record. Each raw record is a pickled Python dictionary containing MP4 bytes, video shape, actions, and optional source metadata; tokenized records are written out as msgpack ArrayRecord, containing the tokenizer latent representation and actions. The raw video settings are located in configs/dataset/minecraft_vpt.yaml, where dataset_mean and dataset_std are the pixel statistics used to normalize video values. When changing the raw dataset,Need to recompute.

Training details The tokenizer learns a dynamics model from latent representations; the default configuration is configs/tokenizer.yaml. Before running, you need to edit this file and configs/dataset/minecraft_vpt.yaml. Output is written by default to logs/<run_name>/, where checkpoints/ stores tokenizer and optimizer checkpoints, and vis/ stores reconstructed images when visualize_every > 0. Tokenizer training can use shorter windows than full original episodes, for example a fixed 256-frame record can be trained with 16-frame windows and then tokenized as full 256-frame latent episodes. After tokenization is complete, you need to edit configs/tokenize.yaml, write out latent shards and statistics, print the latent statistics, and copy latent_mean and latent_std to configs/dataset/minecraft_vpt_latent.yaml, while also pointing array_record_path and index_max to the tokenization output. The dynamics model is trained on latent ArrayRecord and shifted actions; the default configuration is configs/dynamics.yaml, which imports configs/dataset/minecraft_vpt_latent.yaml, and both files need to be edited before running. Generating videos and computing FVD requires first editing configs/eval_fvd.yaml; mode=generate only saves MP4, while mode=evaluate computes FVD based on previously generated videos. All configurations are Hydra/OmegaConf YAML files under configs/, and the main script configurations have comments on the purpose and constraints of each field.

Repository layout and limitations The main workflow expects raw Minecraft/VPT-style shards named shard-*.array_record; example values such as index_max, short_T, long_T, horizon, and fvd_chunk_size are explained in dreamer/data/README.md. The current repository does not provide the complete Dreamer 4 behavior cloning/reinforcement learning agent training loop, nor does it give a formal license; the page indicates it is temporarynotice, and the formal license is expected to be released in a future version.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools