Registry / ai-ml / vsa
library0.1.7pypypiunverified

VSA (Video Sparse Attention) is a CUDA kernel for efficient sparse attention in video diffusion models, part of the FastVideo library. Current version 0.0.5 (PyPI) and 0.1.7 (GitHub release). Development is active with frequent releases. Requires Python >=3.10 and CUDA toolkit.

pip install vsa
INSTALL
IMPORT
SIG · VSA
V
vsa
ai-mlpythonv0.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vsa
✓ import vsa
✗ from video_sparse_attn import ...
The PyPI package name is vsa, and the module is also vsa. The CUDA source lives under csrc/attn/video_sparse_attn but the Python package is just vsa.

Basic usage of VSA for sparse video attention.

import torch import vsa # Create query, key, value tensors (batch, heads, seq_len, dim) q = torch.randn(1, 8, 1024, 64, device='cuda') k = torch.randn(1, 8, 1024, 64, device='cuda') v = torch.randn(1, 8, 1024, 64, device='cuda') # Sparse attention using VSA output = vsa.video_sparse_attn(q, k, v) print(output.shape)
Debug
Known issues
breakingPyPI version 0.0.5 is outdated and may have API incompatibilities with the latest GitHub releases.
fix
Install directly from GitHub or wait for a new PyPI release: pip install git+https://github.com/hao-ai-lab/FastVideo.git#subdirectory=csrc/attn/video_sparse_attn
affects: <0.1.x
gotchaVSA requires a CUDA-compatible GPU and the CUDA Toolkit to be installed. Without it, import will fail.
fix
Ensure nvcc is in PATH and torch is CUDA-enabled.
affects: all
deprecatedThe 'v0' code paths were removed in release v0.1.2. If you rely on any v0 features, upgrade carefully.
fix
Update your code to use the new API if present, or stay on v0.0.5.
affects: >=0.1.2
Upgrade
Version history
0.1.7latest on PyPI
Audit
Dependencies
torchrequiredVSA is a PyTorch extension
CUDA ToolkitrequiredRequires nvcc to compile CUDA kernels
Agent activity
45 hits · last 30 days
node
40
Perplexity
1
OpenAI (training)
1
Resources
vsa — pip install vsa · libregistry