Architecture
~8 min readUpdated: November 2026

MAGI-2 Preview: 114B-A6B MoE Synchronized Audio-Video Generation

MAGI-2 Preview 114B-A6B MagiMoE Synchronized Audio-Video Generation Architecture in Smoke Monkey

MAGI-2 Preview from Sand.ai is an Apache-2.0 114B-parameter Mixture-of-Experts model that activates 6B parameters per token to synthesize synchronized 10-second audio-video clips up to 1080p. It pairs a 228 GB preview transformer, a 14 GB refiner stage, a Qwen3.5-27B text encoder, and dual video/audio VAEs.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

MAGI-2 Preview: 114B-A6B MoE Synchronized Audio-Video Generation: MAGI-2 Preview from Sand.ai is an Apache-2.0 114B-parameter Mixture-of-Experts model that activates 6B parameters per token to synthesize synchronized 10-second audio-video clips up to 1080p. It pairs a 228 GB preview transformer, a 14 GB refiner stage, a Qwen3.5-27B text encoder, and dual video/audio VAEs. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.

Key Architectural Takeaways
Quick Implementation Examplemagi-2-preview-agent.ts
magi-2-preview-agent.tstypescript
import { createAgent } from "@smoke-monkey/harness";
const mediaAgent = createAgent({
agentId: "magi-2-preview-orchestrator",
provider: "ollama",
model: "qwen2.5-coder:14b",
workspacePath: process.cwd(),
permissions: {
read_file: "allow",
write_file: "allow",
run_command: "ask",
},
});
async function generateSynchronizedClip() {
const result = await mediaAgent.run(
"Format the raw prompt using prompts/t2v.md JSON structure, verify 8 Hopper GPUs " +
"and ffmpeg on PATH, then invoke torchrun --nproc_per_node=8 inference/pipeline/entry.py " +
"--config configs/magi2_refiner.json --output-width 1080 --output-height 1920 --deterministic."
);
console.log("[MAGI-2 Agent] Completed:", result.summary);
}
generateSynchronizedClip().catch(console.error);
Video Guides

Watch: Related Video Guides

MAGI-2 by Sand AI: 30 Second 1080p AI Video With Sound From One Prompt (Tested)

How to Create AI Video FREE via Magi Sand AI Tutorial

What Is MAGI-2 Preview? MagiMoE Architecture & Checkpoint Breakdown

MAGI-2 Preview is an open-weight, Apache-2.0 unified audio-video generation model built on Sand.ai's MagiMoE architecture. It contains 114B total parameters while activating 6B parameters per token, producing synchronized 10-second video and sound clips from either text prompts (T2V) or text-plus-image inputs (I2V).

Rather than running a monolithic 1080p diffusion pass, MAGI-2 splits synthesis into two cascaded transformers: magi2_preview denoises global motion and audio-visual timing at 512x896, and magi2_refiner lifts the latent trajectory to 1088x1920 (multiples of 16 required by the VAE stride, optionally rescaled to exact 1080x1920). Conditioning relies on a Qwen/Qwen3.5-27B text encoder, while latent decoding pairs a distilled TurboVAE decoder (Wan2.2-TI2V-5B lineage) with stable-audio-open-1.0.

307 GB Checkpoint Layout & 8x Hopper Offloading Controls

The complete Hugging Face release (sand-ai/MAGI-2-preview) totals roughly 307 GB across six modular checkpoint directories, designed to run on 8x NVIDIA Hopper 80GB GPUs via torchrun:

Checkpoint DirectoryDisk FootprintRole in PipelineDefault Offload Mode
preview/ (56 shards)228 GB114B-A6B base audio-video denoising (512x896)roundtrip (MAGI2_PREVIEW_OFFLOAD_MODE)
text_encoder/56 GBQwen/Qwen3.5-27B structured prompt embeddingsMAGI2_TEXT_ENC_OFFLOAD_MODE
refiner/ (3 shards)14 GB1088x1920 high-resolution latent refinementroundtrip (MAGI2_REFINER_OFFLOAD_MODE)
stable-audio-open-1.0/5 GBDecodes synchronized audio latents to waveformMAGI2_VAE_OFFLOAD_MODE
vae/ (Wan2.2_VAE.pth)3 GBBase Wan2.2-TI2V-5B video encoder/decoderMAGI2_VAE_OFFLOAD_MODE
turbo_vae/2 GBDistilled sliding-window video decoder (default)Single-rank per video

Because neither preview nor refiner fits on an 80GB card alongside the other stage's 1080p activations, roundtrip offloading swaps inactive stages between host RAM and HBM around each phase. Set MAGI2_CKPT_ROOT to relocate weights without modifying configs/magi2_refiner.json.

Docker Deployment, Weight Download & 1080p CLI Execution

Use Sand.ai's prebuilt Docker image (sandai/magi-2-preview) to pull pinned MagiAttention and MagiCompiler CUDA extensions, download the 307 GB checkpoint tree, and invoke torchrun across 8 Hopper GPUs:

bash
# 1. Pull precompiled Hopper runtime (pin commit tag for benchmarks)
docker pull sandai/magi-2-preview:latest

# 2. Download 307 GB model weights into ckpt/
pip install huggingface_hub
hf download sand-ai/MAGI-2-preview --local-dir ckpt
export MAGI2_CKPT_ROOT=/data/magi2-weights

# 3. Launch 1080p T2V generation with bit-exact MoE scatter
docker run --gpus all -it -v /data/magi2-weights:/workspace/ckpt sandai/magi-2-preview:latest \
  torchrun --nproc_per_node=8 inference/pipeline/entry.py \
  --prompt "a red fox in snow" \
  --config configs/magi2_refiner.json \
  --output-width 1080 --output-height 1920 \
  --deterministic --output output/

Ensure ffmpeg is present on PATH; otherwise the pipeline writes the MP4 video stream silently without muxing the decoded stable-audio-open-1.0 track.

Structured 10-Second JSON Prompting with Smoke Monkey Canvas

Hand-written one-line prompts underutilize MAGI-2 Preview because training captions follow a structured 10-second temporal schema. The repository ships two system prompts—prompts/t2v.md and prompts/i2v.md—that instruct an LLM to expand a user brief into timeline-aligned JSON (sample_enhanced_t2v.json) before generation.

In Smoke Monkey Canvas, teams separate prompt expansion and GPU execution into two connected agents: a lightweight LLM node transforms user briefs or keyframe images into validated JSON captions, and a gated cluster worker triggers torchrun while capturing MAGI2_SAVE_LATENT_PATH artifacts for downstream quality inspection.

VAE Stride & Exact 1080p Scaling

The MAGI-2 VAE enforces multiples of 16, generating 1088x1920 natively for the 1080p tier. Always pass `--output-width 1080 --output-height 1920` when exact 16:9 delivery dimensions are required.

Google Search Questions & Answers

Frequently Asked Questions

Q:How many parameters does MAGI-2 Preview have and how many are active?

MAGI-2 Preview has 114B total parameters built on Sand.ai's MagiMoE sparse Mixture-of-Experts architecture, activating 6B parameters per token during inference.

Q:What hardware is required to run MAGI-2 Preview locally?

Official inference requires 8x NVIDIA Hopper 80GB GPUs, Python 3.12, a recent CUDA toolkit (with MagiAttention and MagiCompiler), ~307 GB of storage for checkpoints, and ffmpeg on PATH to mux audio.

Q:How does MAGI-2 Preview generate 1080p video with synchronized audio?

It runs a two-stage cascade: magi2_preview (228 GB) denoises a 10-second clip at 512x896, magi2_refiner (14 GB) refines it to 1088x1920, TurboVAE decodes video latents, stable-audio-open-1.0 decodes audio latents, and ffmpeg muxes both streams.

Q:Why does MAGI-2 Preview require roundtrip offloading on 80GB GPUs?

At 1080p resolution, the 228 GB preview transformer and 14 GB refiner cannot stay resident on 80GB HBM cards simultaneously alongside activations. Setting MAGI2_PREVIEW_OFFLOAD_MODE and MAGI2_REFINER_OFFLOAD_MODE to roundtrip stages each model around its active phase.

Q:Can MAGI-2 Preview generate clips longer than 10 seconds?

No. In the current MAGI-2 Preview release, 10 seconds is the only supported clip duration across both T2V and I2V pipelines.

Related Alternatives & Comparisons

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness