← Back to Leaderboard
SAlibabaResearch

AlibabaResearch/SparkDiffusion

arXiv:2612.04263 ↗

A Wan video DiT toolkit for faster inference with sparse attention and few-step students

View on GitHub ↗
LLM TrainerQuickstart ↓
Engineering Health (Methodology)
B+ · 68/100
Maintenance Activity
● Updated 1mo ago
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

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

Maintenance26/35
Fork Adoption16/25
Release Cadence6/20
License Clarity20/20
GPUCLI
Total Stars
★ 868
24h Growth
+3
7d Growth
+55
Forks
92

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

AlibabaResearch/SparkDiffusion Star History (2026-09-20 - 2026-12-04) ALL-TIME STAR HISTORY (2026-09 – 2026-12) +867 in 75d · avg +12/day 916 458 0 2026-09-20: ★ 12026-09-26: ★ 1652026-10-03: ★ 3952026-10-10: ★ 4602026-10-17: ★ 5072026-10-24: ★ 5332026-10-31: ★ 5622026-11-05: ★ 5872026-11-10: ★ 6432026-11-15: ★ 7022026-11-20: ★ 7462026-11-25: ★ 7962026-11-30: ★ 8332026-12-04: ★ 868 ★ 868 09-20 10-27 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

SparkDiffusion is a Python/PyTorch research stack for accelerating Wan video diffusion transformers. A typical workflow starts with a native Wan checkpoint, finetunes the backbone with RoLa sparse low-rank attention, and uses CrossDistill's trajectory-level hybrid distillation to train a few-step student. The inference CLI pairs that student DiT with native VAE, T5 and tokenizer assets, plus the native CLIP vision encoder for Wan 2.1 I2V. Wan 2.2 uses a shared asset root with separate high- and low-noise DiT experts.

sparkdiffusion/ contains models, samplers, checkpoint handling and operators; imaginaire/ provides training and configuration utilities, with Hydra and OmegaConf in the dependency manifest. A sparse-attention registry lets attention variants plug in without rewriting the core loops. The kernel boundary matters: sparkdiffusion/ops/fused_kernel/ supplies inference operators on the CUDA/Triton stack, while RoLa training launched through torchrun requires an external SLA backward kernel.

Key Capabilities & Differentiators

The common inference wrappers compare dense, sparse and distilled checkpoints for Wan text-to-video (T2V) and image-to-video (I2V) workflows. Released students cover specific combinations: Wan 2.1 T2V has 1.3B and 14B 480p four-step checkpoints at 0.90 sparsity, plus 14B 720p variants at 0.97/four steps and 0.95/three steps. Wan 2.1 I2V has a 14B 720p release at 0.97/four steps, and Wan 2.2 T2V has a 14B 480p release at 0.95/four steps. Treat those entries as validated configurations to try, not as interchangeable settings for any checkpoint.

Wan 2.2 finetuning can target either noise expert, train both sequentially, or train them jointly; the joint distillation launcher loads both experts in one process. Standard launchers accept native Wan directories or safetensors, supported .pt/.pth files, and distributed checkpoint (DCP) directories without a separate conversion step. The finetuning loader rejects a zero-parameter backbone match and warns on partial matches, while new RoLa parameters are expected to start uninitialized by the stock checkpoint.

Trade-offs & Limitations

Native dense Wan is the most useful baseline: it avoids the need for a matching RoLa student and preserves the original denoising path. SparkDiffusion trades that simplicity for less attention work and fewer denoising steps, with optional weight–activation quantization when the hardware supports it. The fp8 path calls for FP8 Tensor Cores; bf16 is the fallback. High sparsity and a short schedule are not substitutes for checking motion, prompt adherence and diversity on your own clips.

Do not treat the headline 265× over a dense multi-step baseline as an expected deployment result. The CLI times CUDA-synchronized denoising: later serial samples avoid first-sample warmup, the measured interval includes expert transfers during denoising, and video decoding and writing are excluded. Compare that metric separately from complete job latency and throughput. Released students avoid the training kernel dependency; reproducing or extending training adds local dataset preparation, an SLA checkout and teacher/student configuration.

Hardware & Deployment Guide

Run on Linux with Python 3.10 or newer and a CUDA-capable GPU. Install CUDA-matched PyTorch, torchvision and a compatible flash-attn build before the remaining requirements, which specify Triton ≥3.4.0. The manifest also flags removal of megatron-core for training setup. Source scripts/env.sh to set PYTHONPATH, repository-relative roots and offline defaults for Hugging Face and W&B. Stage native Wan assets and the matching student weights separately; training also needs local data and SLA_SRC set to a valid external checkout.

Use scripts/inference/ for local CLI inference or scripts/sparse_finetune/ and scripts/distill/ for training. The inference path accepts one prompt per process and saves videos locally; no serving API is shown. Size the GPU against the actual checkpoint, output resolution, precision, expert configuration and intended concurrency, rather than extrapolating from serial samples. No GitHub release is listed. For reproducible runs, record the repository revision alongside the exact checkpoint and CUDA/PyTorch/Triton versions.

Attention: RoLa combines sparsity and low-rank factorization behind a registry shared by training and inference.
Distillation: CrossDistill uses trajectory-level hybrid distillation; released students use three or four denoising steps.
Checkpoint coverage: Released Wan 2.1/2.2 students span 1.3B and 14B configurations, 480p and 720p, and 0.90–0.97 sparsity; not every combination is available.
Expert routing: Wan 2.2 launchers distinguish high- and low-noise experts and provide a joint training and distillation path.
Kernel boundary: Bundled fused inference operators do not require SLA_SRC; RoLa training requires the external backward kernel.
Timing: NUM_SAMPLES reuses loaded models at batch size one and separates warmup from CUDA-synchronized steady-state denoising.
Best For

GPU-equipped research or infrastructure teams benchmarking dense versus sparse and distilled Wan, or adapting RoLa and CrossDistill to their own data.

Skip If

You need a managed generation API, CPU-only inference, or turnkey multi-prompt serving rather than a local, single-prompt CLI workflow.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

GPUCLI
pip install -r requirements.txt
source scripts/env.sh

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/AlibabaResearch/SparkDiffusion.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.

AlibabaResearch/SparkDiffusion Star History on RepoForAI

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

Frequently Asked Questions about SparkDiffusion

How do I run a released student, and when do I need the external SLA checkout?

Give the inference wrapper the native Wan asset root and point DIT_PATH at the matching SparkDiffusion student. For Wan 2.2, CKPT_LOW selects the low-noise student. Standard dense and fused RoLa inference do not need SLA_SRC; sparse finetuning and distillation do because the student needs the external backward kernel, even with a dense teacher.

How should I size GPU memory and measure runtime overhead?

There is no exact VRAM requirement in the available configuration details. Start with the released 1.3B 480p T2V student if your workload allows it, and profile the 14B, 720p, or dual-expert configuration if that is what you intend to deploy. Use fp8 on GPUs with FP8 Tensor Cores and bf16 otherwise. Measure peak VRAM and whole-job latency separately from warmed-up denoising; NUM_SAMPLES runs serially at batch size one and is not a concurrency test.

Can I self-host SparkDiffusion commercially?

The code is Apache-2.0 licensed, which permits commercial use subject to its terms. Self-hosted CLI inference can use local assets, but the code license does not settle the terms for native Wan weights, SparkDiffusion checkpoints, the external SLA checkout, or training data. Review those separately and retain applicable license and notice materials when redistributing.

When should I choose SparkDiffusion over a native dense Wan workflow?

Start with native dense Wan when you need a reference or have no suitable sparse student. Choose SparkDiffusion when a matching student exists and lower denoising latency is worth validating a different checkpoint and compatible GPU kernels. The shared wrappers support dense, sparse, and distilled comparisons; benchmark them on the same GPU, task, output configuration, and seed set, then evaluate motion quality and diversity as well as latency.

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 AlibabaResearch/SparkDiffusion? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature AlibabaResearch/SparkDiffusion 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