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)

Searching Database…

这是什么?H3-World 是一个基于 MiniMax-H3 构建的交互式世界模型:给它一帧初始画面,它就会生成你可以用键盘操作来控制的视频,就像用按键开车一样在游戏世界里驰骋。
它是现成的应用,还是需要我自己运行的研究代码?研究代码:是一套 Python 训练和推理脚本,通过一个打了补丁的 DiffSynth-Studio-h3-v2 代码库,在 33B 的 MiniMax-H3 模型之上运行一个小型 LoRA 适配器。没有图形界面,也没有安装包。
怎么让它跑起来?先配置好带 CUDA 12.8 的 Python 3.10,下载 MiniMax-H3 FL2VA 底模权重和 H3-World LoRA 检查点,然后运行推理脚本——仓库自带一张测试图 examples/firstframe.png,用它就能生成一段 5.2 秒向前行进的片段。
上手之前有什么配置上的坑需要知道?有:发布的检查点需要打补丁,禁止用可编辑安装(editable install),而且它要求 MiniMax 原生的 FL2VA 检查点目录结构,而不是 Diffusers 的那种——只要照着 README 做,就不需要重映射键名。
我能用自己的图片作为起始画面吗?可以——把 examples/firstframe.png 换成你的图片,并用 --scene-prompt 描述它的静态场景和主体。如有需要,你的图片会被居中裁剪成 832x480。
我可以让它做什么动作和运镜?内置十一种预设:静止、前进、后退、左右平移、上仰/下俯、左右摇镜以及快速摇镜。完整的按键到动作语言的对照表在 code/abot/actionscript.py 里。
训练的部分和整个模型相比有多大?很小:LoRA 参数只有 65.6M——仅占 33B 的 MiniMax-H3 主干的 0.199%——是用 ABot-World-Explorer-500h 数据集中的 8000 段游戏实录片段训练出来的。
我能用自己的片段来训练它吗?可以:准备好包含 7,872 个片段的训练集,缓存潜变量(latents),注入每条潜变量对应的动作指令,然后运行 code/train.sh——在 qkvproj/outproj 上做 rank-32 的 LoRA,训练 20 个 epoch,每 2,000 步保存一次检查点。
Size
227.9 MB
Stars
318
Updated
CommitSep 17
Age
1mo
Commits · 90 Days