H3-World README

The project's README from github.com/Danzer1xxxxChan/H3-World. As one markdown file: README.md.

H3-World: Turning Language Understanding into World Control

H3-World is the first interactive world model built on MiniMax-H3. It generates action-controlled video from an initial frame by converting keyboard states into per-latent language instructions and binding each instruction to its corresponding future video latent through directed attention routing. Using 8,000 gameplay clips from ABot-World-Explorer-500h, H3-World learns 65.6M LoRA parameters, only 0.199% of the 33B backbone.

arXiv Hugging Face model Project page ModelScope

https://github.com/user-attachments/assets/1c862995-8809-447e-bade-2c47bfdb2738

H3-World: Turning Language Understanding into World Control
Danze Chen1,2, Zeqing Wang1,2, Ziyue Lin3, Xingyi Yang3, Yeying Jin1,2
1Tencent   2National University of Singapore   3The Hong Kong Polytechnic University

⚙️ Setup

Tested with Python 3.10 and CUDA 12.8.

conda create -n minimax_h3 python=3.10 -y
conda activate minimax_h3
pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt

# Use the exact DiffSynth revision and the H3-World attention patch.
git clone https://github.com/modelscope/DiffSynth-Studio.git DiffSynth-Studio-h3-v2
git -C DiffSynth-Studio-h3-v2 checkout "$(cat code/diffsynth_base_commit.txt)"
git -C DiffSynth-Studio-h3-v2 apply ../code/diffsynth_h3_action.patch

# Keep Hugging Face, Torch, and Triton caches inside this repository.
source env.sh

Download the required weights into the following locations:

Asset Required for Target location
MiniMax-H3 FL2VA base weights inference and training DiffSynth-Studio-h3-v2/models/MiniMax/MiniMax-H3/
H3-World LoRA inference checkpoints/H3-World/step-10000.safetensors
ABot-World-Explorer-500h training only any local path, passed through ABOT_SRC_ROOT
python3 -c "
from huggingface_hub import snapshot_download
snapshot_download(
    'MiniMaxAI/MiniMax-H3',
    allow_patterns=['model_index.json', 'FL2VA/*'],
    local_dir='DiffSynth-Studio-h3-v2/models/MiniMax/MiniMax-H3'
)"

python3 -c "
from huggingface_hub import hf_hub_download
hf_hub_download(
    'DANNY621/H3-World',
    'step-10000.safetensors',
    local_dir='checkpoints/H3-World'
)"

H3-World uses the original FL2VA checkpoint layout released by MiniMax, rather than the root-level Diffusers checkpoint. No weight conversion or key remapping is required.

The patch is required for the released checkpoint. Do not install DiffSynth-Studio-h3-v2 in editable mode; the included training and inference scripts verify that they load the patched checkout.

🎬 Inference

The repository includes a held-out ABot test frame at examples/first_frame.png. The following fixed configuration generates a 5.2-second forward-motion video:

python3 code/abot/infer.py \
  --checkpoint checkpoints/H3-World/step-10000.safetensors \
  --first-frame examples/first_frame.png \
  --scene-prompt "A man in a yellow floral shirt stands in a dim, multi-level concrete parking garage." \
  --action-preset forward \
  --seed 2 \
  --steps 50 \
  --num-frames 124 \
  --cfg-scale 1.0 \
  --out outputs/example_forward.mp4

The included frame is sample d0b768c6 from the held-out test split. To use a custom image, replace examples/first_frame.png and describe its static scene and subject with --scene-prompt. Inputs are center-cropped to 832x480 when needed. The built-in presets are still, forward, back, strafe-left, strafe-right, tilt-up, tilt-down, pan-left, pan-right, pan-left-fast, and pan-right-fast. The full key-to-language mapping is defined in code/abot/action_script.py.

🏋️ Training

Prepare the 7,872-clip training split, cache its latents, inject the per-latent action instructions, then train LoRA:

# 1. Build clips and the fixed train/test split from ABot.
ABOT_SRC_ROOT=/path/to/ABot-World-Explorer-500h \
  python3 code/abot/build_abot_clips.py --num-clips 8000 --workers 48
ABOT_SRC_ROOT=/path/to/ABot-World-Explorer-500h \
  python3 code/abot/build_abot_clips.py --verify 8
python3 code/abot/split_abot_metadata.py \
  --input data/abot_meta_8000.jsonl \
  --train-output data/abot_meta_train_7872.jsonl \
  --test-output data/abot_meta_test_128.jsonl \
  --clips-dir data/clips

# 2. Cache the video, audio, and text latents, then add action text.
bash code/cache.sh
python3 code/abot/inject_abot_text.py \
  --meta data/abot_meta_train_7872.jsonl \
  --cache output/minimax_h3_abot/7872-cache \
  --device cuda:0

# 3. Train on four GPUs by default.
bash code/train.sh

code/train.sh uses rank-32 LoRA on qkv_proj and out_proj for 20 epochs, saving checkpoints every 2,000 steps. Override the visible devices with CUDA_VISIBLE_DEVICES=4,5,6,7 bash code/train.sh.

🙏 Acknowledgements

📚 Citation

@misc{chen2026h3worldturninglanguageunderstanding,
      title={H3-World: Turning Language Understanding into World Control},
      author={Danze Chen and Zeqing Wang and Ziyue Lin and Xingyi Yang and Yeying Jin},
      year={2026},
      eprint={2609.01560},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2609.01560},
}

H3-World (Danzer1xxxxChan/H3-World)

interactive
Searching Database…

What is this?H3-World is an interactive world model built on MiniMax-H3: give it one initial frame and it generates video you steer with keyboard actions, like driving a game world with your keys.
Is it a ready-made app or research code I run myself?Research code: Python training and inference scripts that run a small LoRA adapter on top of the 33B MiniMax-H3 model through a patched DiffSynth-Studio-h3-v2 checkout. No GUI or installer.
How do I get it running?Set up Python 3.10 with CUDA 12.8, download the MiniMax-H3 FL2VA base weights plus the H3-World LoRA checkpoint, then run the inference script — the repo ships a test frame at examples/firstframe.png that yields a 5.2-second forward-motion clip.
Any setup gotchas I should know before trying?Yes: the released checkpoint needs a patch, editable installs are forbidden, and it expects the original FL2VA checkpoint layout from MiniMax rather than the Diffusers one — no key remapping needed if you follow the README.
Can I use my own starting image?Yes — replace examples/firstframe.png and describe its static scene and subject with --scene-prompt. Your image gets center-cropped to 832x480 if needed.
What movements and camera moves can I ask for?Eleven built-in presets: still, forward, back, strafe-left/right, tilt-up/down, pan-left/right and fast pans. The full key-to-language mapping lives in code/abot/actionscript.py.
How big is the trained part compared to the full model?Tiny: 65.6M LoRA parameters — just 0.199% of the 33B MiniMax-H3 backbone — learned from 8,000 gameplay clips of the ABot-World-Explorer-500h dataset.
Can I train it on my own clips?Yes: prepare the 7,872-clip training split, cache latents, inject the per-latent action instructions, then run code/train.sh — rank-32 LoRA on qkvproj/outproj, 20 epochs, a checkpoint every 2,000 steps.
Size
227.9 MB
Stars
319
Updated
CommitSep 17
Age
1mo
Commits · 90 Days