lvsa-add-model

Implement ModelAdapters to add LVSA support for video diffusion models.

18|4|Updated May 21, 2026
One-click install
npx skills add https://github.com/JiusiServe/LongVideoSparseAttention --skill lvsa-add-model
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lvsa-add-model
Source: https://github.com/JiusiServe/LongVideoSparseAttention/tree/main/skills/lvsa-add-model
Command: npx skills add https://github.com/JiusiServe/LongVideoSparseAttention --skill lvsa-add-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LVSA's engine is model-agnostic; adding support for a new video diffusion model involves implementing a dedicated ModelAdapter, wiring it into lvsa/adapters, and providing a minimal example wrapper so the model can be plugged into the generation pipeline.

Core Features & Use Cases

  • Copy an existing adapter (wan.py or hunyuan_video.py) to your model-specific adapter and implement the required methods to handle geometry, QKV, and RoPE.
  • Wire the adapter into examples/<model>_generate.py and, if needed, add a vllm-omni hook to support special pre-attention behavior.
  • Choose the integration path (ABC adapter for single/joint streams or processor swap for asymmetric attention) based on the model's architecture.

Quick Start

Copy the closest LVSA adapter as a template, implement your model’s adapter and example wrapper, and wire it into the adapter registry.

Frequently Asked Questions about lvsa-add-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new video diffusion model to LVSA?▼

To add a new video diffusion model to LVSA, implement a dedicated ModelAdapter by copying an existing template like wan.py, wire it into the adapter registry, and provide a minimal example wrapper to plug it into the generation pipeline.

What is the process for implementing a video diffusion model adapter?▼

Implementing a video diffusion model adapter requires following an 11-method template to handle geometry, QKV, and RoPE, then wiring the adapter into the example generation script and adding vllm-omni hooks for special pre-attention behavior if needed.

Does LVSA support both single-stream and dual-stream video diffusion architectures?▼

LVSA supports Wan-like single-stream, HV-like dual-stream, and CogVideoX-style joint-attention video diffusion models by choosing the appropriate integration path, such as an ABC adapter for single or joint streams or a processor swap for asymmetric attention.

How do I validate a new video diffusion model adapter before GPU deployment?▼

Validate a new video diffusion model adapter before GPU deployment by running CPU smoke tests to ensure the model's generation script and the 11-method adapter implementation function correctly within the LVSA pipeline.

What should I do if my video diffusion model has asymmetric attention mechanisms?▼

For video diffusion models with asymmetric attention, use the processor swap integration path instead of the ABC adapter to properly handle the custom pre-attention behavior within the LVSA adapters framework.

Can I use an existing LVSA adapter as a template for a new video diffusion model?▼

You can copy the closest existing LVSA adapter, such as wan.py or hunyuan_video.py, as a template to start implementing your model-specific adapter and required methods for geometry, QKV, and RoPE.