Yuze He1,2, Bin Tan2, Zelin Gao3,2, Yujun Shen2, Yong-Jin Liu1,*, Nan Xue2,*, Yinghao Xu3,2
1Tsinghua University Β Β
2Ant Group Β Β
3HKUST
*Corresponding authors.
NeurIPS 2026
PPMem generates camera-controlled video from a single image while building a persistent 3D memory of the scene. Each video segment jointly predicts RGB and planar geometry. The planes are merged into a growing memory and rendered from upcoming camera viewpoints to guide subsequent generation.
- Persistent planar memory. Oriented planes represent surfaces with seven parameters per primitive.
- Video and explicit geometry. Generation produces RGB video together with depth, surface normals, and exportable plane geometry.
- Camera-controlled exploration. A supplied camera trajectory controls the generated views.
π οΈ Installation Β· π€ Model weights Β· π Run the included example Β· πΌοΈ Use your own inputs Β· π¦ Outputs Β· π Inference guide Β· π Citation
Use Linux, Python 3.10 or later, Git, a C++ compiler, and a CUDA toolkit compatible with your PyTorch build and FlashAttention-3. Make sure nvcc is available and CUDA_HOME points to the toolkit.
PPMem runs on a single NVIDIA GPU and uses about 19 GiB of GPU memory with the default settings. A GPU with at least 24 GB of memory is recommended.
PyTorch 2.12 and later build CUDA extensions as C++20, which requires GCC 11 or later. If your system compiler is older (Ubuntu 20.04 ships GCC 9), install a newer one and point CC and CXX at it. In a conda environment, this command does both once you reactivate the environment:
conda install -c conda-forge gcc_linux-64=12 gxx_linux-64=12First install a CUDA-enabled PyTorch and matching torchvision using the PyTorch installation guide. Choose the CUDA build for your environment. Clone the code repository, then run these commands in the same Python environment:
git clone https://github.com/robbyant-research/PPMem.git
cd PPMem
python -m pip install "packaging>=24.2" "setuptools>=78.1.1" wheel ninja versioningit einops
python -m pip install --no-build-isolation -r requirements.txt
python -m pip install --no-deps -e .XFORMERS_DISABLED=1 python - <<'PY'
from flash_attn_interface import flash_attn_varlen_func
from diff_rect_rasterization import RectRasterizationSettings, RectRasterizer
from moge.model.v2 import MoGeModel
print("Dependency imports OK")
PYPPMem uses FlashAttention-3 by default. On Hopper GPUs, you can install MagiAttention v1.0.4 with CUDA toolkit 12.8 or later:
python -m pip install --no-build-isolation -e '.[magi]'When installed, MagiAttention is used for the DiT's self-attention and cross-attention on these GPUs. Depth token fusion continues to use FlashAttention-3.
PPMem automatically downloads π€ Robbyant-Research/PPMem on first use and reuses Hugging Face's local cache on subsequent runs.
For your own images, MoGe 2 also downloads its weights automatically. The bundled example provides initial depth and intrinsics with --init_geometry, so it does not load MoGe.
To use weights you already have, add these options to your demo command:
| Model | Local override |
|---|---|
| PPMem | --checkpoint /path/to/ppmem-checkpoint |
| MoGe 2 | --moge-checkpoint /path/to/moge-2-vitl-normal.pt |
Both options also accept a Hugging Face repository ID. The PPMem directory must include its weight shards and index, plus vae/, text_encoder/, and tokenizer/. For offline use, provide local paths or populate the Hugging Face cache first and set HF_HUB_OFFLINE=1.
examples/ has three scenes, each with an input image, camera poses, frame-0 geometry and a text prompt. After installation, run the first 121 frames:
scene=examples/scene01
bash scripts/run_demo.sh \
--image "$scene/input.png" \
--extrinsic "$scene/camera.npy" \
--init_geometry "$scene/geometry.npz" \
--prompt "$(cat "$scene/prompt.txt")" \
--out runs/example \
--max_steps 4 \
--seed 42The video is saved to runs/example/pool/generated_full.mp4 at 1024 Γ 576. The log is runs/example/run.log.
--max_steps is the last chunk index, not the number of chunks: 4 generates chunks 0β4, giving 121 frames. Omit it to run to the end of the supplied trajectory. Use a new or empty output directory; completed runs are skipped. See the inference guide for overwriting unfinished runs or resuming from a completed chunk.
Provide an image, a scene prompt, and a camera trajectory. Without --init_geometry, PPMem estimates initial depth and intrinsics with MoGe.
| Input | Format |
|---|---|
| Image | Center-cropped to 16:9 and resized to 1024 Γ 576. |
| Camera poses | An (N, 4, 4) float32 .npy array of camera-to-world transforms, using OpenCV axes: +X right, +Y down, +Z forward. |
| Trajectory scale | Translation must use the same units as initial depth; MoGe provides estimated meters. |
| Initial geometry, optional | A .npz containing the first frame's depth and matching intrinsics. Store the depth at the image's own resolution, or crop it to the image's 16:9 center crop. |
The trajectory helper supports dolly, pendulum, and spin. Video chunks contain 25 frames and overlap by one frame; the last chunk takes whatever frames are left, so any frame count works. Use gradual camera motion relative to scene depth.
See the inference guide for a custom-image example, trajectory controls, the complete geometry format, runtime options, resume instructions, and the Python CLI.
runs/example/
βββ run.log # Demo script log
βββ run_meta.json # Invocation parameters
βββ chunks/chunk_000/ # Per-chunk output archives
βββ pool/
βββ generated_full.mp4 # Assembled video
βββ diagnostic_grid.mp4 # RGB, depth, and projection diagnostics
βββ merged_plane_params.pt # Accumulated plane parameters
βββ merged_planes_world.ply # Plane geometry in world coordinates
To inspect the plane pool, run:
python scripts/pool_report.py runs/exampleThe report is saved under runs/example/pool_report/ and contains a growth chart, top-down views colored by source chunk and depth, and a JSON summary.
@article{he2026ppmem,
title = {Persistent Planar Memory for Video World Models},
author = {He, Yuze and Tan, Bin and Gao, Zelin and Shen, Yujun
and Liu, Yong-Jin and Xue, Nan and Xu, Yinghao},
journal = {arXiv preprint arXiv:2610.23795},
year = {2026}
}PPMem builds on Wan, MoGe, FlashAttention, MagiAttention, and the PlanarSplatting rectangle rasterizer.
The code is licensed under the Apache License 2.0. Model weights and third-party components retain their own licenses.


