Agent skill

Sparkdiffusion Distill

by AlibabaResearch in AlibabaResearch/SparkDiffusion

Configure and launch SparkDiffusion few-step distillation for Wan 2.1 or Wan 2.2.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Sparkdiffusion Distill

skills CLI
$ npx skills add AlibabaResearch/SparkDiffusion --skill sparkdiffusion-distill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AlibabaResearch/SparkDiffusion sparkdiffusion-distill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AlibabaResearch/SparkDiffusion.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/sparkdiffusion-distill .claude/skills/sparkdiffusion-distill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sparkdiffusion-distill
GitHub stars
541
Token cost
~876 tokens
SKILL.md length
262 words
Files
2
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

Configure and launch SparkDiffusion few-step distillation for Wan 2.1 or Wan 2.2.

  • Works in 6 steps: Source the repository environment → Export the required external SLA… → Select a launcher under scripts/distill/… → …
  • A user asks to distill a sparse student against a dense teacher
  • SKILL.md covers Preflight, Wan 2.1 T2V, Wan 2.1 I2V and Wan 2.2 Joint Experts, plus 1 more section
  • Calls bash

What it does

Sparkdiffusion Distill is an agent skill from AlibabaResearch/SparkDiffusion. Configure and launch SparkDiffusion few-step distillation for Wan 2.1 or Wan 2.2. Use when a user asks to distill a sparse student against a dense teacher, choose T2V/I2V or high/low experts, resume a distillation run, or validate its inputs.

Its SKILL.md is about 880 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in AI & LLM Engineering. The repository describes itself as: SparkDiffusion: Accelerating DiT video generation by 265× via joint Sparsity, Distillation, Quantization, etc. The licence is Apache-2.0.

When your agent uses it

  • A user asks to distill a sparse student against a dense teacher
  • High/low experts
  • Resume a distillation run
  • Validate its inputs

Example prompts

  • “/sparkdiffusion-distill”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Source the repository environment
  2. Export the required external SLA checkout before starting Python or torchrun
  3. Select a launcher under scripts/distill/ instead of reconstructing the torchrun command by hand.
  4. Check all model, tokenizer, negative-embedding, and dataset paths before launching.
  5. Keep W&B offline unless online logging is explicitly requested
  6. Start with a short smoke run by overriding MAX_ITER, SAVE_ITER, and NPROC_PER_NODE where supported.

What it can do on your machine

Read from SKILL.md and the folder at commit 6149ac5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sparkdiffusion Distill loads about 876 tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 262 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~876

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AlibabaResearch/SparkDiffusion at commit 6149ac5, republished under its Apache-2.0 licence (© AlibabaResearch). 262 words, ~876 tokens.

Download SKILL.mdSave it as .claude/skills/sparkdiffusion-distill/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
sparkdiffusion-distill
description
Configure and launch SparkDiffusion few-step distillation for Wan 2.1 or Wan 2.2. Use when a user asks to distill a sparse student against a dense teacher, choose T2V/I2V or high/low experts, resume a distillation run, or validate its inputs.

SparkDiffusion Distillation

Use this skill after the teacher, student, and distillation dataset are available. Do not use it for sparse finetuning.

Preflight

  1. Source the repository environment:

    bash
    source scripts/env.sh
  2. Export the required external SLA checkout before starting Python or torchrun:

    bash
    export SLA_SRC=/absolute/path/to/SLA
    test -d "${SLA_SRC}/sparse_linear_attention"

    The teacher may be dense, but the trainable RoLa student requires the SLA backward kernel. Do not use a machine-specific default.

  3. Select a launcher under scripts/distill/ instead of reconstructing the torchrun command by hand.

  4. Check all model, tokenizer, negative-embedding, and dataset paths before launching.

  5. Keep W&B offline unless online logging is explicitly requested:

    bash
    WANDB_MODE=offline
  6. Start with a short smoke run by overriding MAX_ITER, SAVE_ITER, and NPROC_PER_NODE where supported.

Wan 2.1 T2V

bash
SLA_SRC=/absolute/path/to/SLA \
WAN_REPO=pretrain_weights/Wan2.1-T2V-14B \
TEACHER_CKPT=pretrain_weights/Wan2.1-T2V-14B \
STUDENT_CKPT=outputs/rola/<finetune_job>/checkpoints/<student_model> \
DATASET_ROOT=datasets/distill/<dataset_name> \
NPROC_PER_NODE=8 \
bash scripts/distill/wan2.1_14b_t2v_480p.sh

Use wan2.1_1.3b_t2v_480p.sh for the 1.3B T2V variant.

Wan 2.1 I2V

Use the appropriate 480p or 720p launcher and provide the image encoder:

bash
SLA_SRC=/absolute/path/to/SLA \
WAN_REPO=pretrain_weights/Wan2.1-I2V-14B-480P \
CLIP_ENCODER=pretrain_weights/Wan2.1-I2V-14B-480P/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth \
TEACHER_CKPT=pretrain_weights/Wan2.1-I2V-14B-480P \
STUDENT_CKPT=outputs/rola/<finetune_job>/checkpoints/<student_model> \
DATASET_ROOT=datasets/distill/<dataset_name> \
bash scripts/distill/wan2.1_14b_i2v_480p.sh

I2V must use an I2V-compatible checkpoint and dataset. Do not pass a T2V student to an I2V configuration.

Wan 2.2 Joint Experts

Provide native high and low teachers plus the corresponding sparse-finetuning outputs:

bash
export SLA_SRC=/absolute/path/to/SLA
WAN_REPO=pretrain_weights/Wan2.2-T2V-A14B
WAN_REPO=${WAN_REPO} \
TEACHER_CKPT=${WAN_REPO}/high_noise_model \
TEACHER_CKPT_LOW=${WAN_REPO}/low_noise_model \
STUDENT_CKPT=outputs/rola/<high_job>/checkpoints/<student_model> \
STUDENT_CKPT_LOW=outputs/rola/<low_job>/checkpoints/<student_model> \
DATASET_ROOT=datasets/distill/<dataset_name> \
bash scripts/distill/wan2.2_a14b_t2v_480p_joint.sh

The student checkpoints are Stage-1 outputs and are not stored inside WAN_REPO. The 720p launcher follows the same contract. Do not omit the low expert when the experiment is configured as joint.

Checkpoints

  • DCP directories preserve model, optimizer, scheduler, and trainer state for resuming.
  • Model-only PTH files are portable inputs for downstream inference and stage transitions when produced by the repository's conversion/export path.
  • Do not use a distilled student with the multi-step diffusion inference launcher; that is a sampling-regime mismatch.
  • Record the exact teacher, student, dataset, experiment name, and output directory with every run.

© AlibabaResearch, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/sparkdiffusion-distill of AlibabaResearch/SparkDiffusion.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 6149ac5

Compare with similar skills

Sparkdiffusion Distill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sparkdiffusion Distill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sparkdiffusion Distill this skillAlibabaResearch/SparkDiffusion541—~876Automated safety check: PassApache-2.0
Agent Prompt Quality Barmastra-ai/mastra29k—~2kAutomated safety check: PassCustom licence
Course Guidefancyboi999/ai-engineering-from-scratch-zh1.2k—~948Automated safety check: PassMIT
Advanced Evaluationguanyang/open-agent-hub9772 repos~4.2kAutomated safety check: PassMIT
Agentic Self Distillationburtenshaw/training-agents153—~354Automated safety check: PassApache-2.0
nanoGPT Training GuideOrchestra-Research/AI-Research-SKILLs13k2 repos~1.7kAutomated safety check: PassMIT

Similar skills

  • Agent Prompt Quality Bar

    mastra-ai/mastra

    Universal quality bar and final audit rubric for any agent system prompt.

    29k GitHub stars~2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Course Guide

    fancyboi999/ai-engineering-from-scratch-zh

    AI Engineering from Scratch 课程的主题路由器。给它一个主题、问题或正在处理的 bug, 它会指出精确教授它的课程,以及下一条正确命令。触发短语: “在哪里学习”、“哪节课涵盖”、“课程导航”、“我卡在”、“接下来该做什么”、 “教我 MCP”、“教我 Agent Skills”、“在哪里准备 Claude certification”,或 "where do I…

    1.2k GitHub stars~948 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Advanced Evaluation

    guanyang/open-agent-hub

    This skill should be used for advanced LLM evaluation: LLM-as-judge systems, direct scoring, pairwise comparison, rubric calibration, evaluator bias mitigation, confidence scoring, and automated…

    977 GitHub starsUsed in 2 repos~4.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Agentic Self Distillation

    burtenshaw/training-agents

    A skill your agent uses when designing or reviewing self-distillation workflows for agentic models, including trace collection, teacher or judge feedback, rejection sampling, critique, conversion to…

    153 GitHub stars~354 tokensUpdated 26 days ago
    AI & LLM EngineeringAuto-check passed
  • nanoGPT Training Guide

    Orchestra-Research/AI-Research-SKILLs

    Walks through nanoGPT, Karpathy's compact GPT implementation: training on Shakespeare, reproducing GPT-2, fine-tuning GPT-2 checkpoints and training on your own text.

    13k GitHub starsUsed in 2 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Learn Agent Skills

    fancyboi999/ai-engineering-from-scratch-zh

    AI Engineering from Scratch 中 Agent Skills Engineering 路线的专注交互 tutor。

    1.2k GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from AlibabaResearch/SparkDiffusion

  • Sparkdiffusion Finetune

    AlibabaResearch/SparkDiffusion

    Configure and launch SparkDiffusion sparse finetuning for Wan 2.1 or Wan 2.2.

    541 GitHub stars~904 tokensUpdated today
    Auto-check passed
  • Sparkdiffusion Inference

    AlibabaResearch/SparkDiffusion

    Run validated SparkDiffusion inference for Wan 2.1 or Wan 2.2 T2V/I2V models.

    541 GitHub stars~853 tokensUpdated today
    Auto-check passed
  • Sparkdiffusion Setup

    AlibabaResearch/SparkDiffusion

    Prepare a SparkDiffusion checkout for training or inference.

    541 GitHub stars~732 tokensUpdated today
    Auto-check passed

Questions about Sparkdiffusion Distill

What does Sparkdiffusion Distill do?

Configure and launch SparkDiffusion few-step distillation for Wan 2.1 or Wan 2.2. Sparkdiffusion Distill is an agent skill from AlibabaResearch/SparkDiffusion.2.

When should I use Sparkdiffusion Distill?

Sparkdiffusion Distill fits situations like: A user asks to distill a sparse student against a dense teacher; high/low experts; resume a distillation run; validate its inputs.

How do I install Sparkdiffusion Distill in Claude Code?

Run `npx skills add AlibabaResearch/SparkDiffusion --skill sparkdiffusion-distill -a claude-code`. Or copy the skill folder (.agents/skills/sparkdiffusion-distill in AlibabaResearch/SparkDiffusion) into .claude/skills/sparkdiffusion-distill in your project. Claude Code loads it when a task matches its description.

How do I install Sparkdiffusion Distill in Codex?

Run `npx skills add AlibabaResearch/SparkDiffusion --skill sparkdiffusion-distill -a codex`. Or copy the skill folder (.agents/skills/sparkdiffusion-distill in AlibabaResearch/SparkDiffusion) into .agents/skills/sparkdiffusion-distill in your project. Codex loads it when a task matches its description.

Can I use Sparkdiffusion Distill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AlibabaResearch/SparkDiffusion --skill sparkdiffusion-distill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sparkdiffusion-distill, .gemini/skills/sparkdiffusion-distill, .github/skills/sparkdiffusion-distill and .opencode/skills/sparkdiffusion-distill in your project.

What does Sparkdiffusion Distill need to run?

Going by SKILL.md and its folder, Sparkdiffusion Distill needs the command-line tools its instructions call (bash). Our summary lists: Python 3.

Does Sparkdiffusion Distill access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sparkdiffusion Distill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sparkdiffusion Distill use?

Sparkdiffusion Distill is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sparkdiffusion Distill use?

About 876 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sparkdiffusion Distill?

Skills that share tags, products or a category with Sparkdiffusion Distill: Agent Prompt Quality Bar (mastra-ai/mastra, 29k stars), Course Guide (fancyboi999/ai-engineering-from-scratch-zh, 1.2k stars), Advanced Evaluation (guanyang/open-agent-hub, 977 stars) and Agentic Self Distillation (burtenshaw/training-agents, 153 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sparkdiffusion Distill?

AlibabaResearch (a GitHub organization) maintains it in AlibabaResearch/SparkDiffusion, which has 541 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.

Source: AlibabaResearch/SparkDiffusion on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.