Model reference · open weights

PAN2

Video IFM Image→video 1 build Open weights 528 dl/mo

PAN2 is an open-weight video model from IFM. PAN2 (BF16) weighs 86.1 GB; the smallest configuration that runs it is H100 80 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • PAN 2 is a 29.2B parameter world model developed by IFM that simulates how the world changes in response to actions by generating video from text and optional image inputs.
  • It supports simulative reasoning for agents and robotics, producing videos up to 20 seconds long at a resolution of 704x1248 and 24 fps.
  • The model is released under the Apache 2.0 license and operates in English.

Summary of the IFM/PAN2 model card, 2026-11-20

What it is

Released byIFM
Released2026-10-07
Parameters29.2B
VRAM86.1 GB for the weights

What it runs on

Memory and cards for PAN2 (BF16)

86.1 GBweights, file size
67.4 GBbiggest part
537 MBruntime overhead
CardWeightsMemory
RTX 3060 12 GB … L40S 48 GBdoes not fit
A100 80 GBtight (encoders offloaded)78.2 GB
H100 80 GBtight (encoders offloaded)78.1 GB
RTX PRO 6000 Blackwell 96 GBtight93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What IFM says about PAN2

Read the model card

Developed by the Institute of Foundation Models (IFM) at MBZUAI.

Overview

PAN 2 is a general-purpose world model: it simulates how the world will change in response to actions. Given a current observation (an optional image plus text) and actions described in text, it simulates the outcome as a video of up to 20 seconds. This supports simulative reasoning: an agent can imagine the outcomes of its candidate actions before choosing among them, by simulating each plan with PAN 2 and acting on the one whose simulated outcome is best.

PAN 2 follows the Generative Latent Prediction (GLP) architecture formalized in Critique of World Models and couples conceptual reasoning by a large language model with perceptual reasoning by a latent diffusion model. The language model, the conceptual reasoning backbone, reasons over the observation and the requested actions and writes the next world state as a structured, time-grounded description of events, timed actions bound to actors, and camera motion. The frozen text encoder maps the structured description to the conditioning features used by the diffusion model. The 29B-parameter MMDiT, the perceptual reasoning backbone, trained from scratch on hundreds of millions of videos annotated in the same format, predicts the perceptual detail that the description leaves open: the video latents that realize the state, conditioned on it and on the VAE latent of the starting image. The Wan 2.2 VAE decoder renders the predicted latents as the next observation, so every prediction can be seen and checked against real footage.

Checkpoints

PAN 2's latent diffusion model is released as a single checkpoint that serves both tasks. The frozen text encoder (Qwen3.5-9B) and VAE (Wan 2.2) are downloaded from their own repositories.

CheckpointSupported TasksInput ConditionsOutputPrecision
PAN 2 diffusion backbone (IFM/PAN2)Text-to-video (t2v), Image-to-video (i2v)Structured world-state caption; optional first frameVideo via the VAE decoder, 704x1248 at 24 fps, up to 20 sBF16

Usage

PAN 2 is also supported in Diffusers and vLLM; the instructions below use this repository's generate.py.

Local Deployment of the PAN 2 Simulator

The released perceptual backbone weights are in the diffusers layout (PAN2Transformer3DModel). Download them and convert them once for this repository's generate.py:

hf download IFM/PAN2 --include "transformer/*" --local-dir /path/to/PAN2
python scripts/convert_checkpoint.py to-native \
    --input /path/to/PAN2/transformer --output /transformer

Then pass /transformer as CKPT_PATH below.

Environment (see docs/environment.md):

conda create -n pan python=3.14 -y && conda activate pan
pip install torch==2.12.1 torchvision==0.27.1 --index-url https://download.pytorch.org/whl/cu132
pip install --pre "flash-attn-4[cu13]==4.0.0b29" --no-build-isolation
pip install "quack-kernels[cu13]==0.6.4"
pip install -r requirements.txt

Frozen components (text encoder and VAE, fetched from the Hugging Face cache at HF_HOME):

export HF_HOME=YOUR_HF_PATH
hf download Qwen/Qwen3.5-9B
hf download Wan-AI/Wan2.2-TI2V-5B-Diffusers

Checkpoint. CKPT_PATH is a training checkpoint-N/transformer directory (DCP), a model_state.pt, or a directory of *.safetensors. The architecture is read from config/sft_29B_720p.yaml; no model root is needed.

Generate (single node, one generate.py worker per GPU; each worker holds the full 29B diffusion model and takes every N-th prompt):

bash inference/inference.sh   [PROMPTS_JSON]   # or sbatch, same arguments

PROMPTS_JSON defaults to inference/prompts/examples.json (one t2v and one i2v record with structured negatives and a reference image). Any entry with an image_path (or type: i2v) runs as image-to-video. Videos land in /{t2v,i2v}/ next to a *_config.json; a rerun into the same directory skips finished clips.

Default sampler:

ControlValue
Steps / flow shift50 / 9
Classifier-free guidance2.5 on every step
Resolution / frame rate704 x 1248 at 24 fps
Frames241 (about 10 s) for entries without a duration; up to 481 (20 s)
Seed123
Precisionbf16 transformer
I2Vtemporal latent 0 uses the positive prediction without guidance

Override any default through environment variables (NUM_STEPS, FLOW_SHIFT, GUIDANCE_SCALE, VIDEO_LENGTH, SEED, NUM_GPUS, ...) or pass extra generate.py flags in EXTRA_ARGS (CFG windows, skip-layer guidance, timestep schedules). See docs/inference.md.

Full PAN 2 Workflow

The full workflow runs the conceptual reasoner on a free-text prompt, then the locally deployed perceptual pipeline on its structured output.

See docs/inference.md for the prompt JSON format.

Prompting Guidance

The PAN 2 perceptual backbone is conditioned on structured world-state captions, so prompts work best in that format. Free-text prompts should be rewritten by a conceptual reasoner before generation.

  • PAN 2 Conceptual Reasoner skill: a Codex / Claude Code agent skill carrying the caption policy (system_prompt.md), the fixed negative prompt, and a validator for the text-encoder token budget (soft limit 1,480, hard capacity 1,536 tokens per caption).
  • inference/prompts_rewritter.py: offline rewriting with a local instruction-tuned model.
  • [docs/inference.md](http

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Running it yourself

Run it on a rented GPU

Rent a machine by the hour. ComfyUI is installed on it. Open ComfyUI through the tunnel and load the workflow from the model's card on Hugging Face; choose this model's file in its loader.

# on your rented machine (the ssh line is on its page in the console)
# get REPO FILE FOLDER: one file into /workspace/models/FOLDER, where ComfyUI loads it from
get() { hf download "$1" "$2" --local-dir /workspace/hf-files && mkdir -p "/workspace/models/$3" && mv "/workspace/hf-files/$2" "/workspace/models/$3/$4"; }

# the model (6.0 GB)
get IFM/PAN2 transformer/diffusion_pytorch_model-00014-of-00014.safetensors diffusion_models
get IFM/PAN2 vae/diffusion_pytorch_model.safetensors vae

start-comfyui
Renting a GPU: connect, tunnels, ComfyUI
# on your computer, in a second terminal: ComfyUI in your browser at http://localhost:8188
# HOST, PORT and BOOKING are your machine's, from its page in the console
ssh -o HostKeyAlias=axforge-BOOKING -o StrictHostKeyChecking=accept-new -L 8188:localhost:8188 dev@HOST -p PORT
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms