Practical overview
When it fits
Use Sparkdiffusion when you need a code-based acceleration workflow for supported Wan DiT video models and can provide the local GPU environment, model assets and compatible checkpoints.
Who it is for
- Developers running supported Wan video-generation models on local CUDA-capable Linux systems.
- Researchers and engineers working with sparse-attention fine-tuning or few-step distillation for DiT video models.
Documented uses
- Run prompt-based Wan text-to-video inference with a SparkDiffusion checkpoint.
- Run supported image-to-video workflows for Wan models.
- Fine-tune sparse attention or distill supported Wan configurations using the repository launchers.
- Compare warmup and later denoising timings in sequential inference samples.
Requirements & limits
The repository is public on GitHub and declares the Apache-2.0 license. Running the documented workflow requires a Linux CUDA-capable GPU and separately supplied model assets and checkpoints.
- The documented setup is GPU-oriented: Linux, CUDA-compatible PyTorch, Triton and flash-attn are required.
- Native Wan assets and a compatible SparkDiffusion checkpoint are separate from the repository.
- The README describes optional weight-activation quantization and checkpoints with different resolutions, sparsity settings and inference steps.
- The project’s acceleration claims are relative to a dense multi-step baseline; its timing notes distinguish denoising from decoding and file writing.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Sparkdiffusion for Wan 2.1 T2V inference
Prepare the documented local environment and assets for the Wan 2.1 text-to-video inference example.
Before you start
- Linux with a CUDA-capable GPU
- Python 3.10 or newer and CUDA-compatible PyTorch
- Compatible flash-attn, Triton and packages in requirements.txt
- Native Wan 2.1 T2V assets: VAE, T5 encoder, tokenizer and base DiT
- A compatible SparkDiffusion checkpoint
Steps
Clone the SparkDiffusion repository, install the CUDA-matched PyTorch and compatible flash-attn build, then install the remaining dependencies with pip install -r requirements.txt.
Run source scripts/env.sh from the repository to configure PYTHONPATH and repository-relative data and output roots.
Place the native Wan assets under pretrain_weights/ and download a compatible SparkDiffusion checkpoint separately.
Set DIT_PATH to the checkpoint and use the documented inference wrapper with the native asset root, output directory and prompt; select fp8 on supported GPUs or bf16 otherwise.
Expected outcome
The documented wrapper generates a prompt-based Wan 2.1 T2V video in the selected output directory; the first sample is marked warmup, and later samples are labeled after warmup.
Guide limitations
- This recipe covers the documented Wan 2.1 T2V quick-start path, not every model or training workflow.
- Weights and datasets are not included in the repository and must be supplied separately.
- The first sample may include compilation or autotuning; the reported denoising timing excludes decoding and video writing.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 November 2026
- Original website title
- AlibabaResearch/SparkDiffusion · Official homepage title · retained in its source language

