# Wizard: Manipulate Any World in Real Time via Agentic Control
**Training and inference code for the Wizard video generator**
[](https://arxiv.org/abs/2610.40339)
[](https://wyzardwu.github.io/wizard/)
[](https://huggingface.co/datasets/yuzhewu207/wizard)
[](https://huggingface.co/datasets/yuzhewu207/wizard-precoded)


Wizard turns any scene image and any character references into a playable, real-time game world. An agent keeps the
game state (scene geometry, character skeletons, combat logic) and renders it into a **visual proxy**; a video model
built on [Wan2.2-TI2V-5B](https://github.com/Wan-Video/Wan2.2) turns the proxy into game frames, streaming at
**24 FPS with 2 denoising steps**.
This repository contains the **video generator**: the four-stage training pipeline (bidirectional teacher → causal
teacher → consistency distillation → DMD) and the three inference modes, including online world maintenance.
## Highlights
- **Proxy-driven control.** Scene geometry and articulated skeletons are rendered into one condition video and
concatenated with the video latents on the channels: precise camera and motion control, zero-shot to new scenes,
characters and motions.
- **Identity binding.** Each reference image is visible only inside its character's skeleton box.
- **Geometry you can trust.** The proxy marks every pixel as *exact*, *coarse* or *unknown*; the model follows exact
geometry and invents unknown regions.
- **Spatial memory.** World-coordinate tokens and retrieved memory frames let the model redraw a place it has seen
when the camera comes back.
- **Real time.** A causal 2-step student with a KV cache (20-frame window + attention sink), distilled with history
self-augmentation and DMD; the world is maintained online on a second GPU without blocking generation.
## What is new compared with the paper
| | Paper (arXiv v1) | This release |
|---|---|---|
| Visual proxy | height / depth, G = 0 | + per-pixel tier (sky / unknown / coarse / exact) with normal shading, outlined skeletons, weapons, shields |
| World tokens | – | world coordinates + tier, added to every video and memory token |
| Memory | – | per-chunk retrieved memory frames, all characters hidden |
| Causal training | teacher forcing → CD → DMD | + history self-augmentation; memory and world tokens in every stage |
| Beyond the first view | invented terrain | marked *unknown*, then filled online from the generated frames |