Image-to-Video
Diffusion Single File
world-model
video-generation
game-ai
street-fighter
state-aware
Instructions to use YeyingLab/StatePlay with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use YeyingLab/StatePlay with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add StatePlay model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: image-to-video
|
| 3 |
+
library_name: stateplay
|
| 4 |
+
base_model:
|
| 5 |
+
- Wan-AI/Wan2.2-TI2V-5B
|
| 6 |
+
datasets:
|
| 7 |
+
- onepiece1999/StatePlay-Dataset
|
| 8 |
+
tags:
|
| 9 |
+
- world-model
|
| 10 |
+
- video-generation
|
| 11 |
+
- game-ai
|
| 12 |
+
- street-fighter
|
| 13 |
+
- state-aware
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# StatePlay: State-Aware Game World Models for Mechanics-Consistent Generation
|
| 17 |
+
|
| 18 |
+
[**Project Page**](https://jimntu.github.io/stateplay_page/) ·
|
| 19 |
+
[**Paper**](https://arxiv.org/abs/2607.26754) ·
|
| 20 |
+
[**Code**](https://github.com/Jimntu/StatePlay) ·
|
| 21 |
+
[**Dataset**](https://huggingface.co/datasets/onepiece1999/StatePlay-Dataset)
|
| 22 |
+
|
| 23 |
+
StatePlay is a state-aware game world model for mechanics-consistent generation in *Street Fighter III*. Unlike pixel-only game world models, StatePlay jointly predicts future visual frames and explicit internal game states—including the timer, player and opponent health points, and both skill meters—conditioned on an initial frame, a text prompt, and player actions.
|
| 24 |
+
|
| 25 |
+
StatePlay uses a Mixture-of-Transformers (MoT)-style architecture with specialized visual and state branches connected through bidirectional joint attention. Predicted state dynamics can therefore guide frame generation while each branch preserves its modality-specific representation. Experiments show an average normalized L1 distance below 0.06 for state prediction and an 18.6 percentage-point improvement in mechanics fidelity over the strongest stateless baseline.
|
| 26 |
+
|
| 27 |
+
## Checkpoint
|
| 28 |
+
|
| 29 |
+
`StatePlay.safetensors` is the complete StatePlay DiT state dictionary trained for 50,000 steps.
|
| 30 |
+
|
| 31 |
+
| Item | Value |
|
| 32 |
+
|---|---|
|
| 33 |
+
| Base architecture | Wan2.2 TI2V 5B with a StatePlay state branch |
|
| 34 |
+
| Game | Street Fighter III |
|
| 35 |
+
| Default output | 480 × 832, 101 frames at 20 FPS |
|
| 36 |
+
| Predicted states | timer, player/opponent HP, player/opponent skill meter |
|
| 37 |
+
| Checkpoint size | approximately 11.5 GB |
|
| 38 |
+
| SHA256 | `aba9747fcd3f0c0a3546941253cd99ecd5dbc2c69747d647b91de84ee41f722f` |
|
| 39 |
+
|
| 40 |
+
The checkpoint contains the complete DiT weights. The three Wan2.2 diffusion shards are not required for inference, but the Wan2.2 VAE and T5 encoder and the Wan2.1 UMT5 tokenizer are required.
|
| 41 |
+
|
| 42 |
+
## Installation
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
git clone https://github.com/Jimntu/StatePlay.git
|
| 46 |
+
cd StatePlay
|
| 47 |
+
|
| 48 |
+
python -m venv .venv
|
| 49 |
+
source .venv/bin/activate
|
| 50 |
+
pip install -U pip
|
| 51 |
+
pip install -e .
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
Python 3.10 or newer and a CUDA GPU are required. The reference inference path uses `torch.bfloat16`.
|
| 55 |
+
|
| 56 |
+
## Download
|
| 57 |
+
|
| 58 |
+
Run the following commands from the StatePlay code repository:
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
python -m pip install -U huggingface_hub
|
| 62 |
+
|
| 63 |
+
hf download onepiece1999/StatePlay \
|
| 64 |
+
StatePlay.safetensors \
|
| 65 |
+
--local-dir examples/checkpoint
|
| 66 |
+
|
| 67 |
+
hf download Wan-AI/Wan2.2-TI2V-5B \
|
| 68 |
+
Wan2.2_VAE.pth \
|
| 69 |
+
models_t5_umt5-xxl-enc-bf16.pth \
|
| 70 |
+
--local-dir base_model/Wan-AI/Wan2.2-TI2V-5B
|
| 71 |
+
|
| 72 |
+
hf download Wan-AI/Wan2.1-T2V-1.3B \
|
| 73 |
+
--include "google/umt5-xxl/*" \
|
| 74 |
+
--local-dir base_model/Wan-AI/Wan2.1-T2V-1.3B
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
The resulting files should have this layout:
|
| 78 |
+
|
| 79 |
+
```text
|
| 80 |
+
StatePlay/
|
| 81 |
+
├── examples/checkpoint/StatePlay.safetensors
|
| 82 |
+
└── base_model/Wan-AI/
|
| 83 |
+
├── Wan2.2-TI2V-5B/
|
| 84 |
+
│ ├── Wan2.2_VAE.pth
|
| 85 |
+
│ └── models_t5_umt5-xxl-enc-bf16.pth
|
| 86 |
+
└── Wan2.1-T2V-1.3B/google/umt5-xxl/
|
| 87 |
+
└── ... tokenizer files ...
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
## Inference
|
| 91 |
+
|
| 92 |
+
The code repository provides eight reproducible example inputs. To generate one example:
|
| 93 |
+
|
| 94 |
+
```bash
|
| 95 |
+
export STATEPLAY_BASE_MODEL=/path/to/StatePlay/base_model
|
| 96 |
+
export CUDA_VISIBLE_DEVICES=0
|
| 97 |
+
|
| 98 |
+
./scripts/inference.sh \
|
| 99 |
+
--image examples/inputs/01_macro_success_clip/first_frame.png \
|
| 100 |
+
--actions examples/inputs/01_macro_success_clip/actions.parquet \
|
| 101 |
+
--prompt-file examples/inputs/01_macro_success_clip/prompt.txt \
|
| 102 |
+
--output output.mp4
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
The command writes the generated video to `output.mp4` and the predicted state trajectory to `output_state.txt`. See the [code repository](https://github.com/Jimntu/StatePlay) for the Python API, input schema, additional examples, and training instructions.
|
| 106 |
+
|
| 107 |
+
## Intended use and limitations
|
| 108 |
+
|
| 109 |
+
This release is intended for research on state-aware game world models, action-conditioned video generation, and mechanics-consistent generation. The current model is trained and evaluated on *Street Fighter III* and should not be assumed to generalize to other games or visual domains without additional training. Generated rollouts can still contain visual, temporal, action-control, or state-prediction errors.
|
| 110 |
+
|
| 111 |
+
Users are responsible for complying with the licenses and terms of the StatePlay code, Wan base models, dataset, game content, and other third-party assets.
|
| 112 |
+
|
| 113 |
+
## Citation
|
| 114 |
+
|
| 115 |
+
```bibtex
|
| 116 |
+
@article{stateplay2026,
|
| 117 |
+
title = {StatePlay: State-Aware Game World Models for Mechanics-Consistent Generation},
|
| 118 |
+
author = {Lin, Zijun and Wang, Zeqing and Tan, Cheston and Wen, Bihan and Jin, Yeying},
|
| 119 |
+
journal = {arXiv preprint arXiv:2607.26754},
|
| 120 |
+
year = {2026}
|
| 121 |
+
}
|
| 122 |
+
```
|