MAGI-2 Preview
MAGI-2 text-to-video with joint audio and optional video refinement.
MAGI-2 generates video and audio jointly from text. WorldFoundry integrates the Preview MoE, an optional dense video Refiner, Turbo video decoder, audio codec, and text encoder from SandAI-org/MAGI-2-preview, under Apache-2.0.
No official teaser or method figure is checked into this docs tree.
Runtime contract
The pipeline supports ten-second text-to-video clips. Preview output is 12.5 fps; optional refinement increases temporal resolution and exports at 25 fps while preserving Preview audio.
The Refiner packs video in 8×4×4 latent blocks and uses the released radius-two local-attention window. Exact range-union attention preserves allowed keys without a quadratic dense mask. Sampling uses zero-SNR renoising, five UniPC steps, shift 5, and guidance 2 by default.
Running in WorldFoundry
Prepare the sand-ai/MAGI-2-preview checkpoint layout: preview/, refiner/, turbo_vae/, stable-audio-open-1.0/, and text_encoder/. Components load lazily; Preview layers use sequential GPU residency.
The Qwen3.5 text-encoding worker uses the magi2-preview environment declared in worldfoundry/data/models/runtime/environments/video/magi2-preview.yaml (Transformers 5.5). Install WorldFoundry in that environment too. Studio selects its Python automatically; direct pipeline calls set python_executable as below. The parent pipeline can stay in the unified environment.
from worldfoundry.pipelines.magi2 import NativeMagi2Pipeline
pipeline = NativeMagi2Pipeline.from_pretrained(
"/weights/MAGI-2-preview",
device="cuda",
python_executable="/envs/magi2-preview/bin/python",
)
pipeline(
prompt="A cinematic camera move through a sunlit forest.",
use_refiner=True,
refiner_num_inference_steps=5,
refiner_height=1088,
refiner_width=1920,
output_path="/outputs/magi2-refined.mp4",
seed=42,
)use_refiner=False retains Preview-only behavior. Refiner height and width must be positive multiples of 16. Refinement maps latent temporal size T to 2T−1; output audio comes from the Preview stage.
Build your run
NativeMagi2Pipelineworldfoundry.pipelines.magi2.pipeline_magi2defaultworldfoundry.pipelinewf run \
magi2-preview \
--pipeline.task-profile default \
--jsonValidation
Validated on an H100 with the released Qwen3.5, Refiner, and Turbo weights: the Refiner stage refines a saved Preview latent in five steps (seed 42) into 249 frames at 128×128 and 25 fps, keeping the stereo 44.1 kHz Preview audio. See python tests/manual/magi2_refinement.py --help to replay it.
Limitations
- Image conditioning is unsupported.
- Refinement at the default 1920×1088 resolution and numerical/visual parity with the official release are not validated.
- The 114B Preview requires substantial host RAM and sequential offloading; upstream targets eight Hopper GPUs.




