How saurav-34/owl-wms works
Purpose and entry points
This is a Python/PyTorch research system for action-conditioned Tekken 8 video world models. It encodes gameplay frames into VAE latents, trains a diffusion-transformer-style world model to predict future latents from history plus player actions, then samples and decodes generated video. Primary entry points are train.py, inference/tekken_inference.py, and preproccessing/prepare_latents_owl.py.
1. Raw gameplay and latent-cache boundary
Raw gameplay is an external/manual NPZ input containing images, actions, states, and valid-frame metadata. Preprocessing loads video/pose inputs, selects a VAE checkpoint, encodes frames, and persists latent-centric training data. This intentionally separates expensive visual encoding from iterative world-model training.
Paths: preproccessing/prepare_latents_owl.py, preproccessing/encoder.py, preproccessing/t3_loader.py.
2. VAE integration layer
The VAE is a separately managed git submodule and checkpoint ecosystem, supporting community and custom DCAE-style backbones. The main code bridges model-facing latent conventions rather than embedding VAE implementation into the world model. Custom checkpoint configs are present for pose and no-pose variants.
Paths: owl-vaes, owl_wms/utils/owl_vae_bridge.py, preproccessing/checkpoints/tekken_vae_H200_v6/config.yaml.
3. Latent data loading and sequence construction
Dataset adapters consume cached local or S3-backed latent stores, including Tekken-specific and mixed datasets. Sequence packing converts variable gameplay segments into model-ready temporal batches with aligned action/state conditioning; this is the main data contract between preprocessing and trainers.
Paths: owl_wms/data/tekken_latent.py, owl_wms/data/tekken_latent_multi.py, owl_wms/data/latent_seq_packing.py.
4. Action-conditioned world-model network
Tekken RFT model variants implement the core transformer world model. Shared neural primitives provide attention, multimodal attention, RoPE, embeddings, modulation, normalization, MLPs, and KV cache support. Model outputs operate in latent space, not directly on pixels.
Paths: owl_wms/models/tekken_rft.py, owl_wms/models/tekken_rft_v2.py, owl_wms/nn/mmattn.py.
5. Configuration-driven distributed training
train.py selects architecture, data, optimization, and trainer behavior from YAML. Tekken-specific trainers own the training loop and objective variants; DDP utilities support multi-GPU/multi-node launch via torchrun. Recommended experiment definitions are the no-pose and pose large configurations.
Paths: train.py, owl_wms/trainers/tekken_rft_trainer_v2.py, configs/tekken_nopose_large.yml.
6. Sampling and inference pipeline
Inference loads a configured trained checkpoint plus an action sequence, autoregressively/diffusively samples future latents using Tekken samplers and caching strategies, then renders video through the VAE bridge. Inference is explicitly experimental; caching is a key performance/coherence path.
Paths: inference/tekken_inference.py, owl_wms/sampling/t3_action_v2.py, owl_wms/sampling/tekken_caching_v2.py.
7. Runtime and infrastructure
The runtime is Python with PyTorch and GPU/NCCL distributed execution. Docker packaging supports reproducible cluster jobs. SkyPilot launches Kubernetes-based multi-node GPU workloads. Weights & Biases is used for experiment tracking; S3/Tigris-backed latent datasets are supported through environment credentials.
Paths: Dockerfile, skypilot/config.yaml, owl_wms/data/s3_cod_latent.py.
Main entry points: owl_vae_bridge.py VAE bridge · tekken_rft_trainer_v2.py Tekken RFT trainer · prepare_latents_owl.py Latent preparation · t3_action_v2.py Action latent sampler
Components 21
Latent Preparation
Encodes gameplay once into reusable latent stores.
- Raw gameplay NPZ · Manual input with frames, actions, states, and valid-frame metadata.
- Latent preparation
preproccessing/prepare_latents_owl.py - Video and pose loaders
preproccessing/t3_loader.py - VAE bridge · Connects external VAE backbones to world-model latent conventions.
owl_wms/utils/owl_vae_bridge.py - Owl VAE submodule · Separately managed DCAE-style VAE backbones and checkpoints.
owl-vaes - Latent cache · Persisted latent-centric gameplay data.
Training Data
Builds conditioned temporal batches from latent caches.
- Tekken latent datasets · Reads local, mixed, and remote latent stores.
owl_wms/data/tekken_latent.py - S3/Tigris latent store
owl_wms/data/s3_cod_latent.py - Sequence packing · Aligns variable gameplay segments with action and state conditioning.
owl_wms/data/latent_seq_packing.py
World Model
Action-conditioned latent prediction network.
- Tekken RFT model · Predicts future gameplay latents from history and actions.
owl_wms/models/tekken_rft_v2.py - Multimodal attention · Shared attention and conditioning machinery.
owl_wms/nn/mmattn.py
Training
Configuration-driven distributed optimization.
- Training entry point
train.py - No-pose large config · Selects model, data, optimization, and trainer behavior.
configs/tekken_nopose_large.yml - Tekken RFT trainer · Owns distributed optimization and objective variants.
owl_wms/trainers/tekken_rft_trainer_v2.py - Trained checkpoint
Inference
Samples future latents and renders video.
- Tekken inference · Experimental action-conditioned video generation.
inference/tekken_inference.py - Action latent sampler · Autoregressively/diffusively generates future latents.
owl_wms/sampling/t3_action_v2.py - Tekken sampling cache · Improves generation performance and coherence.
owl_wms/sampling/tekken_caching_v2.py - Generated video
Runtime & Infrastructure
- Docker runtime
Dockerfile - SkyPilot Kubernetes jobs · Launches multi-node GPU workloads.
skypilot/config.yaml
Connections 22
- Raw gameplay NPZ → Latent preparation: source frames and metadata
- Video and pose loaders → Latent preparation: loads inputs
- Owl VAE submodule → VAE bridge: VAE backbone
- VAE bridge → Latent preparation: encodes frames
- Latent preparation → Latent cache: writes latents and conditioning
- Latent cache → Tekken latent datasets: local cached data
- S3/Tigris latent store → Tekken latent datasets: remote cached data
- Tekken latent datasets → Sequence packing: latent segments
- Sequence packing → Tekken RFT trainer: conditioned temporal batches
- Multimodal attention → Tekken RFT model: network primitive
- No-pose large config → Training entry point: selects run
- Training entry point → Tekken RFT trainer: constructs trainer
- Tekken RFT trainer → Tekken RFT model: optimizes
- Tekken RFT trainer → Trained checkpoint: saves
- Trained checkpoint → Tekken inference: loads
- Tekken inference → Action latent sampler: runs generation
- Tekken RFT model → Action latent sampler: predicts latent updates
- Tekken sampling cache → Action latent sampler: cached context
- Action latent sampler → VAE bridge: generated latents
- VAE bridge → Generated video: decodes frames
- Docker runtime → SkyPilot Kubernetes jobs: packages job runtime
- SkyPilot Kubernetes jobs → Training entry point: launches distributed training