← Back to Leaderboard
Pifm-ai

ifm-ai/PAN2

HF Paper ↗

Train and run a dual-stream video transformer for action-conditioned world modeling

LLM TrainerQuickstart ↓
Engineering Health (Methodology)
B+ · 69/100
Maintenance Activity
● Updated 25d ago
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance31/35
Fork Adoption12/25
Release Cadence6/20
License Clarity20/20
CLIGPU
Total Stars
★ 119
24h Growth
+3
7d Growth
+12
Forks
15

GitHub Star History

Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.

ifm-ai/PAN2 Star History (2026-11-09 - 2026-12-01) DAILY STAR HISTORY (23-DAY D1 TELEMETRY) +118 in 22d · avg +5/day 126 63 0 2026-11-09: ★ 12026-11-11: ★ 512026-11-13: ★ 672026-11-15: ★ 752026-11-17: ★ 872026-11-19: ★ 1002026-11-21: ★ 1022026-11-23: ★ 1062026-11-25: ★ 1122026-11-27: ★ 1142026-11-29: ★ 1152026-12-01: ★ 119 ★ 119 11-09 11-20 12-01

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

train.py drives YAML-configured training for a 29.2B-parameter video transformer with 44 joint-attention blocks over video and state streams. The backbone uses 3D RoPE and RMS query/key normalization. Qwen3.5-9B hidden states feed the caption projection, with a budget of 1,536 caption tokens; Wan 2.2 provides the video latent representation.

The loader reads precomputed latents from local disk, packs samples to a token budget, and can mix in image data. It neither decodes pixels nor runs the VAE in the training loop. The PyTorch stack combines FSDP2 hybrid sharding, optional Ulysses context parallelism, and Muon, with FlashAttention 4 and Quack in the pinned CUDA kernel stack. YAML configurations and checkpoint conversion are the main integration points.

Key Capabilities & Differentiators

PAN 2 generates text-to-video and image-to-video from action descriptions. A shared 97-channel input concatenates 48 noisy latent channels, 48 conditioning channels, and a mask; image-to-video uses the first latent frame as the condition. The 704 × 1248 recipe runs at 24 fps and supports up to 481 frames (roughly 20 seconds), with 858 tokens per latent frame after patching.

The trainer covers pretraining and supervised fine-tuning, with logit-normal timestep sampling for pretraining and uniform sampling for SFT under a flow-matching objective. Native inference accepts prompt JSON and offers optional rewriting into structured captions. The rewriter is a separate text step, not a physics verifier. Checkpoint tooling converts transformer weights between native and Diffusers layouts without retraining.

Trade-offs & Limitations

Offline latents remove pixel decoding and VAE compute from each training step, but move preprocessing cost to a separate job and make local storage throughput part of the training budget. Changing the latent representation requires regenerating compatible training data. Context parallelism can help fit long sequences, with communication costs that should be tested on the intended cluster rather than inferred from a debug run.

For inference only, Diffusers or vLLM are integration paths for the same model, not substitutes for the native data and training stack. The repository covers pretraining and SFT but omits the reward learning and model soup used to produce the released weights, so it does not reproduce the full release pipeline. For robotics or planning, a plausible video is useful for proposing outcomes, not as evidence of a constraint-checked state transition.

Hardware & Deployment Guide

The baseline CLI environment uses Python 3.14 and CUDA 13.2 wheels: install PyTorch 2.12.1 and torchvision 0.27.1 from the cu132 index first, followed by the prerelease FlashAttention 4 build and Quack kernels in the specified order. Check the H200 guide and kernel compatibility notes against the target driver and GPU. Cache Qwen3.5-9B for text encoding and Wan 2.2 for offline data preparation and inference.

Use the Slurm scripts for pretraining or SFT and inference/inference.sh for single-node batch generation. Training resumes from the latest checkpoint in the configured output directory, so use a separate directory for a deliberately fresh run. Size memory and local storage throughput against representative clip lengths and workloads. Single-node prompt sharding increases batch throughput; it is not pooling VRAM for one clip. No GitHub release milestone is listed; pin the code revision, model artifacts, and environment for reproducibility.

Backbone: 29.2B parameters across 44 dual-stream joint-attention blocks with 3D RoPE.
Conditioning: One 97-channel input design supports text-to-video and first-frame-conditioned image-to-video.
Data path: Token-budget packing reads offline Wan 2.2 latents from local storage without running a VAE in the training loop.
Distributed training: FSDP2 hybrid sharding, optional Ulysses context parallelism, and the Muon optimizer.
Native inference: generate.py workers shard prompt lists across GPUs, with BF16 sampling and completed-clip skipping in the launch workflow.
Checkpoint portability: Native and Diffusers transformer layouts convert in both directions through tensor rearrangement.
Best For

Research teams with CUDA GPU infrastructure and an offline latent pipeline that want to pretrain, fine-tune, or batch-evaluate action-conditioned video models.

Skip If

You need lightweight inference on commodity hardware, exact reproduction of the full released-weight recipe, or a simulator that exposes verifiable physical states.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodologyReport inaccuracy

Quick Start & Installation

CLIGPU
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

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/ifm-ai/PAN2.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

ifm-ai/PAN2 Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about PAN2

Can I serve a native training checkpoint through Diffusers?

Convert the checkpoint's transformer tensors with scripts/convert_checkpoint.py. The conversion renames, splits, and concatenates tensors rather than retraining the model. Use the matching architecture YAML and provide the Qwen3.5-9B text encoder and Wan 2.2 VAE separately. A converted transformer is not a full training-resume checkpoint.

How should I size GPUs for training and inference?

Start with the H200 setup guide as a reference, not a minimum specification. Measure model loading and peak memory at the intended resolution and duration before increasing concurrency. The native launcher assigns prompts to independent GPU workers; it does not split one generation across their combined VRAM. For training, test context parallelism with representative long sequences rather than relying on a small debug batch.

What does Apache-2.0 cover for commercial self-hosting?

The repository code is Apache-2.0 and can be self-hosted or used commercially under that license. For redistribution, preserve applicable licenses and notices and review NOTICE and THIRD_PARTY_LICENSES. Check the terms for the PAN 2 weights, upstream model assets, and any training data separately; the code license does not establish those rights.

When should I choose the native repository over Diffusers, vLLM, or a simulator?

Use Diffusers or vLLM if the job is to run released weights and the integration fits your stack. Use the native repository if you need to prepare latent datasets, modify the training loop, or fine-tune and export checkpoints. If a downstream decision requires verifiable state transitions or physical constraints, use a simulator that exposes those properties rather than treating generated video as ground truth.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining ifm-ai/PAN2? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature ifm-ai/PAN2 on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare