SandAI-org/MAGI-1
Chunk-autoregressive video diffusion for controllable generation and continuation
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
MAGI-1 combines autoregression across video chunks with joint diffusion denoising within each 24-frame chunk. During training, noise increases across successive chunks, and block-causal attention preserves the temporal ordering. At inference, the next chunk can begin before the current one finishes denoising, allowing up to four chunks in flight. That overlap is a generation mechanism, not a measured real-time guarantee.
T5 supplies text conditioning and a Transformer VAE compresses video latents by 8× spatially and 4× temporally. The diffusion backbone combines parallel attention blocks, QK normalization, grouped-query attention, and SwiGLU feed-forward layers. The Python stack targets PyTorch 2.4.0 and CUDA 12.4, with pinned diffusers, transformers, flash-attn, and flashinfer-python dependencies. The repository separates inference code, example launch scripts, and ComfyUI custom nodes into inference/, example/, and comfyui/.
Key Capabilities & Differentiators
MagiPipeline exposes text-to-video (t2v), image-to-video (i2v), and continuation from a supplied video prefix (v2v). Chunk-wise prompting gives operators a way to change instructions over the course of a sequence rather than relying on one static prompt. Both the 4.5B and 24B families offer base, distilled, and distilled FP8 checkpoints. Shortcut distillation uses step-consistency training to support different inference budgets with a single distilled model.
The reported Physics-IQ continuation scores are 56.02 for 24B and 42.44 for 4.5B, compared with 29.50 for VideoPoet in V2V. In I2V, the 24B score is 30.23. Treat these as separate conditioning regimes: V2V has motion history in its prefix, and its score does not predict the same result from a single image. Evaluate continuity and instruction following on your own footage, especially over multiple prompt changes.
Trade-offs & Limitations
Choose MAGI-1 for video-prefix continuation and timed prompt changes, not on the assumption that it is universally better than Wan 2.1, HunyuanVideo, or a hosted option such as Kling. The human comparison is in-house, and Physics-IQ measures a specific aspect of physical behavior. Before selecting a checkpoint, compare visual quality, motion, and instruction following on representative inputs under matched output settings.
The 4.5B variants have a practical single-card starting point: one RTX 4090. The reference setup for 24B base and distilled is eight H100/H800 GPUs, while distilled FP8 lowers that to four H100/H800 GPUs or eight RTX 4090s. The latter still requires operating a multi-GPU job. No exact VRAM or latency budget is established for a target workload; measure peak memory, startup latency, and sustained throughput at the intended resolution, clip length, and concurrency.
Hardware & Deployment Guide
The container path uses sandai/magi:latest with NVIDIA GPUs. The example grants privileged access and shares the host network and IPC while requesting 32 GB of shared memory; do not adopt those permissions as production defaults without reviewing which settings are necessary. The source path uses Python 3.10.12, PyTorch 2.4.0 with CUDA 12.4, and FFmpeg 4.4. MagiAttention is recommended on Hopper and is not required on non-Hopper GPUs.
Stage the chosen MAGI checkpoint plus the T5 and VAE weights, then configure and launch example/4.5B/run.sh or example/24B/run.sh. This is a local GPU inference path, not a packaged serving API. Repository milestones include ComfyUI support in May 2025 and the availability of MAGI-1.1 24B weights in June 2026; the concrete sizing guidance above applies to the listed MAGI-1 variants. No GitHub release is listed, so pin the repository revision, container digest, and checkpoint revisions for reproducibility.
pp_size: 2 and cp_size: 4.Teams with NVIDIA GPU capacity that need self-hosted image animation, video-prefix continuation, or prompt changes within a sequence, and can benchmark checkpoints against their own workloads.
You need a turnkey hosted API, a CPU-only runtime, or a verified real-time SLA out of the box, or cannot operate the multi-GPU setup needed for the 24B variants.
Quick Start & Installation
docker pull sandai/magi:latest docker run -it --gpus all --privileged --shm-size=32g --name magi --net=host --ipc=host --ulimit memlock=-1 --ulimit stack=6710886 sandai/magi:latest /bin/bash
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| MAGI-1 ★ | 3.8k | +12 | Python | Apache-2.0 | Chunk-autoregressive video diffusion for controllable generation and continuatio |
| HunyuanVideo | 12.9k | +39 | Python | — | A dual-stream-to-single-stream Transformer for self-hosted text-to-video generat |
| LTX-Video | 11.6k | +85 | Python | Apache-2.0 | Legacy LTX-Video: local DiT video generation from prompts, images, and clips |
| whisper | 114.1k | +548 | Python | MIT | Local encoder-decoder Transformer for multilingual speech transcription and tran |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/SandAI-org/MAGI-1.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about MAGI-1
How do I integrate MAGI-1 into an existing workflow?
example/4.5B/run.sh or example/24B/run.sh. Set --config_file, choose --mode, and specify --prompt and --output_path. For i2v, pass --image_path; for v2v, pass --prefix_video_path. ComfyUI custom nodes are available for graph-based workflows. The chunked architecture supports streaming generation, but that does not establish a streaming API or a latency guarantee.Which GPU configuration should I start with, and what VRAM budget should I expect?
pp_size: 2 and cp_size: 4. These are reference configurations, not minimum VRAM requirements. Measure peak VRAM, time to first output, and throughput at your target resolution and concurrency.Can I self-host MAGI-1 for commercial use?
When should I evaluate MAGI-1 against Wan 2.1 or Kling?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
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