WorksComputer Science
InstaGen: Group-Shared Importance Sampling for Fast Video Generation
Abstract
Diffusion Transformers (DiTs) are the dominant architecture for video generation, but their quadratic attention complexity results in substantial computational cost and latency. Permuted block-sparse attention (PBSA) offers a promising approach to reducing this cost by selectively computing blocks of a semantically permuted attention matrix. However, existing approaches typically select only the top few key blocks for each query block, following a top- paradigm. We find that top- selection can be highly sample inefficient in high-entropy attention regimes, which are common in video generation. In these regimes, we show that sampling can provide substantially better approximations under the same computational budget. More generally, we cast block selection as importance sampling, where the top-scoring keys form an exact set that is computed in full and the remaining keys are represented by a sample drawn in proportion to their estimated attention and reweighted by inverse sampling probability. Building on this formulation, we present InstaGen, which can be parameterized by any PBSA method: it replaces the method's block selection with an exact set plus a weighted sample. Each query cluster draws one sample shared by all its queries, so the sampled keys form blocks amenable to efficient GPU execution. In this paper, we take the SVG family of PBSA methods and show that, on Wan2.1-T2V-1.3B and Wan2.1-T2V-14B, InstaGen parameterized by SVG2 improves PSNR over SVG2 by 3.4 dB and 2 dB, respectively, at matched attention density, and by 1.6 dB and 2.2 dB at matched wall-clock time. On Wan2.1-T2V-14B, InstaGen also beats SVG-EAR by 1.1 dB PSNR at nearly the same density while running faster (1.65x against 1.48x over dense).
Introduction
Diffusion Transformers (DiTs) have been instrumental in achieving state-of-the-art quality in image and video generation [14, 20, 7]. However, image and video generation with DiTs remains computationally expensive, primarily due to the quadratic cost of attention, which is repeated across layers and diffusion steps. As a result, generating even short videos can be extremely slow. For instance, generating a single 5-second 720p video (81 frames, 50 denoising steps) with Wan2.1-T2V-14B takes about 22.6 minutes on one H100 GPU. Improving generation latency is therefore essential for enabling the efficient generation of high-quality, long-form videos.
Training-free sparse attention is a natural paradigm for reducing the computational workload of attention in existing video generation models and improving generation latency. However, effective attention sparsity must strike a unique balance between three often non-aligned goals: (1) Quality per query: Each query token should, in effect, attend to the tokens that are most important for that specific query. (2) Efficiency: The sparsity pattern should be amenable to block-based execution so that it can naturally integrate with FlashAttention [11] and benefit from hardware acceleration. (3) Alignment with the underlying model: While each query may, in principle, attend to its most important tokens, the approximation error introduced by sparsity can accumulate across layers and diffusion steps, potentially derailing the model and causing substantial downstream quality degradation. Permuted block-sparse attention (PBSA) methods such as SVG2 and SVG-EAR [19, 23] have primarily focused on addressing the first two goals through clustering query and key tokens, permuting the tokens into contiguous blocks, scoring each block from the cluster centroids, and computing only the selected blocks with a block-sparse attention kernel. However, their treatment of the third goal often results in an unfavorable trade-off between sparsity and downstream generation quality.
To maintain alignment, it is critical to ensure that the local approximation error in attention computation under sparsity is well controlled. Existing PBSA methods employ top- as the underlying sparsification strategy. However, for high-entropy attention distributions, top- ends up retaining a large number of tokens. Thus, the top- paradigm inevitably sacrifices either efficiency or approximation quality. In fact, to the best of our knowledge, all existing sparse video generation methods retain 30% dense steps, as any sparsification under the top- paradigm leads to large approximation errors. This calls for a paradigm shift in sparsity. InstaGen moves away from the deterministic sparsification underlying existing PBSA methods and instead employs stochastic sampling based on importance scores. We find that stochastic sparsity offers a significantly better quality-efficiency tradeoff. In fact, it enables us to completely eliminate dense steps, achieving fully sparse inference for video generation across all layers and all steps.
In InstaGen, we formalize sparse attention as a sampling problem. For each query cluster, the keys are split into an exact set of top-scoring keys, whose attention is computed exactly, and a residual whose contribution is estimated from a sample of its keys reweighted by inverse sampling probability [5]. Top- selection is the special case with no sample. We consider two ways of drawing this sample, importance and uniform sampling. In importance sampling, the attention estimated from the cluster centroids sets the sampling probabilities, and we draw the sample by proportional-to-size sampling without replacement (PPSWOR; § 3.2.1). Uniform sampling includes every residual key with equal probability, thus making it a special case of importance sampling. In this paper, we parameterize InstaGen by SVG2, i.e., it keeps SVG2’s clustering and block scoring and replaces its top- selection. This choice is not a requirement, and the same estimator can be applied to other methods that produce block scores, such as SVOO [10].
Sampling addresses the third goal, but if done naively it can conflict with the second, i.e., efficient execution. If each query had its own sample, it would attend to its own random keys. Then no two queries share a block of keys, and FlashAttention cannot run it. Drawing about 75,600 separate samples per head in every attention call (Wan2.1 at 720p, 81 frames) is also costly. We instead draw one sample per query cluster, using the probabilities computed from its centroid. All queries within the cluster share the resulting sampled keys, yielding a group-shared sampling scheme. This amortizes the sampling overhead across queries while producing a block structure: the cluster’s queries and the sampled keys form a dense block, which is compatible with FlashAttention and can be efficiently accelerated on GPUs. Moreover, sharing a sample adds no bias. For every query in the cluster, the estimates of the attention sums stay unbiased, because the weights use the probabilities the keys were actually drawn with.
We evaluate InstaGen against SVG [16], SVG2, and SVG-EAR on Wan2.1-T2V-1.3B and Wan2.1-T2V-14B, measuring fidelity to the dense model’s video (PSNR, SSIM [15], LPIPS [22]) and video quality with VBench [6]. Over SVG2, InstaGen improves PSNR by 3.4 dB and 2 dB on the 1.3B and 14B models, respectively, at matched attention density (Figure 2, § 5), and on the 14B model it beats SVG-EAR by 1.1 dB PSNR at nearly the same density while running faster. On Wan2.1-T2V-1.3B, InstaGen needs no dense warmup: it runs sparse attention at every diffusion step and still outperforms SVG and SVG2 run with their warmup (Figure 1). Removing the warmup matters most for long videos, because a dense step grows almost quadratically with video length: generating 561 frames, InstaGen without warmup takes 57.3 minutes, against 82.8 for SVG2 and 162 for dense attention (Figure 6).
Figure 1. Frames from a single Wan2.1-T2V-1.3B generation (720p, 81 frames, 50 steps). InstaGen achieves higher pixel fidelity, reaching a PSNR of 25.50 dB at a lower attention density of 32% when compared to SVG and SVG2. Prompt: The camera pans left to right, moving through cherry blossoms to reveal a Japanese street scene. A tram appears, and the camera follows it closer, showcasing cute shop light boxes. The sky glows pink and blue, with warm-lit poles and lamps lining the street. Cherry blossom trees in the foreground frame the peaceful, beautiful atmosphere. The background is softly blurred, emphasizing high-definition details.

Figure 2. InstaGen gives higher quality than SVG2 at both matched density and matched latency on Wan2.1-T2V-1.3B. Left: PSNR against generation time per video. Right: PSNR against attention density, the share of attention computed over the whole generation. SVG2 uses the configuration from its paper (=100, =500, full attention for the first 30% of steps, key floor 0.1) at top- 0.5, 0.75, 0.9 and 0.95. InstaGen runs exact + sampled budgets from 4+4% to 32+32% at two clustering configurations for uniform and one for importance, with the same warmup and without it.
Figure 6. InstaGen with importance sampling matches SVG2’s quality at much lower density. (a) PSNR against overall attention density (warm-up steps count as dense), averaged over 22 VBench prompts on Wan2.1-T2V-1.3B (720p, 81 frames, 50 steps). SVG2 in its paper configuration () reaches 25.03 dB at 44.1%; InstaGen (importance sampling) reaches the same PSNR at 34.0% with the same 30% warm-up, and at 20.0% with no warm-up. (b) Denoising time against the number of frames on one H100 SXM, on one prompt (svg2_ex1, Appendix § 7.§ 1; VAE decoding excluded), with InstaGen (importance sampling) at 4+4% with the 30% warm-up and at 14+14% with no warm-up, budgets at which it beats SVG2 () on PSNR, SSIM and LPIPS on this prompt at 81 frames. At 561 frames dense takes 162 min, SVG2 82.8 min (1.97×), and InstaGen 61.9 min (2.62×) with warm-up and 57.3 min (2.83×) without.
Related Work
Structured sparse attention for video diffusion. Sparse VideoGen (SVG) profiles sampled query rows to assign each head a spatial or temporal sparsity layout [16], and Radial Attention uses a static mask whose density decays with temporal distance [9]. Both fix the layout structurally rather than adapting it to content.
Content-adaptive sparse routing. Other methods estimate block importance from content: XAttention scores blocks by antidiagonal sums [18], AdaSpa searches hierarchical block patterns online [17], and SpargeAttention filters blocks with compressed query/key representatives and an in-kernel softmax-aware test [21]. SVG2 clusters queries and keys, permutes clusters into contiguous storage, and selects cluster pairs by a centroid score [19]. AdaCluster adapts the clustering to layerwise token geometry [13], and SVOO combines an offline per-layer sparsity schedule with online query–key co-clustering [10]. These methods route each query cluster by a single centroid-derived score. InstaGen reuses this component to score token importance.
Recovering skipped attention. SVG-EAR approximates skipped blocks with key/value centroids and recomputes those with high predicted error [23]; SparsePR learns an affine residual correction from the computed attention [12]; and Sol-Attn estimates the skipped contribution from the computed subset [8]. Attention, developed for LLM decoding, instead samples the residual, giving an unbiased estimate with a probabilistic error guarantee [3]. We extend this idea by casting sparse attention as importance sampling, under which top- selection and residual sampling arise naturally.
Changing the model. Veda distills full-attention tile distributions into a learned selector [4]; SANA-Video trains a block-linear video diffusion transformer [2], and SANA-Video 2.0 a hybrid with periodic softmax anchors and cross-depth attention residuals [1]. We focus on training-free sparse attention.
Background
Scaled Dot-Product Attention
Consider a single self-attention head with queries, keys, and values , , , where is the sequence length and is the head dimension. For query , the scaled attention logits are
Softmax attention then produces the output
or, equivalently, as the ratio of two sums
Evaluating dense attention for all queries costs per head. Sparse and sampled approximations target the sums in Eq. (3): rather than including every key/value index , they retain a small subset of indices and estimate the contribution of the remainder. The sampling estimators described below apply directly to approximating and .
Sampling with Probabilities Proportional to Size
Consider the problem of estimating a sum from a subset of of its terms. This problem underlies sparse attention, since the numerator and denominator in Eq. (3) are sums of terms: setting recovers , and setting recovers . We assume that each term is associated with a score that is much cheaper to compute than and serves as an estimate of its magnitude . The goal is an unbiased estimator of with low variance under a budget of terms.
PPSWOR: Probabilities Proportional to Size Without Replacement
PPSWOR is an importance sampling scheme that draws a sample of distinct terms such that terms with larger scores, and hence a larger expected contribution to the sum, are more likely to be included. The scheme is characterized by the inclusion probabilities , which satisfy and are set proportional to the scores, . Capping the target at 1 and renormalizing gives
The left-hand side is nondecreasing in , so is well defined. The terms with form the heavy set , which is the top- set by score, with determined by the scores rather than fixed in advance. The sample therefore consists of all of and residual terms, each included with probability exactly .
The Horvitz–Thompson estimator [5] weights each sampled term by the inverse of its inclusion probability. For the sample above, it separates into a deterministic part and a sampled part:
This estimator is unbiased for any choice of scores, and top- selection is recovered by dropping the second term. We use this formulation in InstaGen.
Algorithm 1 InstaGen attention for one head. are the logits of § 3.1, and are the centroids of query group and key cluster , is the cluster of key , and is its size. Budgets are fractions of the sequence length: means and (written , in percent, in Section 5). Warmup calls, when used, compute dense attention instead.
Input: ; budgets ; sampler UNIFORM or IMPORTANCE
Output:
Cluster queries into groups and keys into clusters ▷ -means, warm-started
for every pair ▷ centroid scores
for each query group do
whole clusters by decreasing until ▷ exact keys
▷ residual keys
if sampler is UNIFORM then
for all
keys of , uniformly without replacement
else
, with such that ▷ § 3.2.1
systematic PPS sample of with probabilities
end if
for , for ▷ Horvitz–Thompson
for all ▷
end for
return
InstaGen
InstaGen builds on the observation in vAttention [3] that sampling can outperform top- selection in high-entropy regimes. InstaGen formulates sparse attention as a sampling problem, which leads naturally to an importance sampling formulation with uniform sampling as a special case.
InstaGen performs PPSWOR sampling using scores that serve as proxies for the exponentiated raw attention scores. We obtain these scores from clusters for two reasons: the centroid of a cluster is a cheap proxy that represents the scores of its tokens, and clustering lets us permute the tokens into contiguous blocks, so that attention follows the block structure of FlashAttention [11] and realizes the theoretical speedup of sparsity. Such scores can come from any method that produces them, such as SVG2 [19] and SVOO [10], among others. For clarity, we adopt the clustering of SVG2, in which the queries and keys are clustered separately with -means into query groups and key clusters with centroids and . The score of query group and key cluster is
which is the proxy for the exponentiated attention score of every query in with every key in .
These scores are used to perform PPSWOR as described in § 3.2.1. All queries in a group share the same scores, and so do all keys in a cluster, so the whole procedure is carried out once per query group. For each query group, the total budget is split in advance into an exact budget and a sampling budget . The exact budget is handled first: the key clusters with the largest total score are selected deterministically until is reached, and we set for their keys.
PPSWOR with budget is then applied to the remaining keys, the residual. Each residual key receives an inclusion probability proportional to its score and capped at 1, as in equation 4, such that the sample contains keys. Keys whose probability reaches 1 are promoted, that is, they are always retained like the exact keys; since scores are constant within a cluster, whole clusters are promoted. The remaining keys () are sampled using PPS, and the sample is shared across all queries of the group. In our kernel, it is drawn with systematic PPS sampling, which attains the prescribed inclusion probabilities exactly. The resulting attention map is illustrated in Figure 3.
Figure 3. Overview of InstaGen. (a) Queries and keys are clustered into groups. (b) Centroid scores give each key group a probability of being used by each query group. (c) The top key group is always kept; the remaining keys are sampled in proportion to and weighted by . (d) Queries in a group share the same keys, so attention runs over dense blocks in one kernel.
This sharing across queries is what keeps the kernel GPU-friendly: all queries in a group attend to the same keys, so queries and attended keys form dense blocks. Let be the PPS sample over the residual. For a query , the estimators of the numerator and denominator in equation (3) can be written as
where is the indicator function, and the output is . Note that both the numerator and denominator estimators are unbiased:
Hardware Efficiency. InstaGen is designed to be compatible with FlashAttention ([11]). All queries in the same cluster attend to the same set of keys, whether exact or sampled. Thus, attention is computed in blocks rather than per query (each selected 128-key tile is either entirely exact or entirely sampled), with the importance weights applied as a logit bias. The sample is drawn on the GPU, where we implement the attention kernel by modifying FlashAttention-3 for NVIDIA Hopper GPUs. Clustering, scoring, and sampling run as separate GPU steps before the attention kernel. Figure 3(d) illustrates this implementation.
Residual Approximation. Like SVG-EAR ([23]), InstaGen estimates the attention of skipped keys instead of dropping it. SVG-EAR does so deterministically, by replacing each skipped cluster with its centroid key and mean value. InstaGen instead samples actual skipped keys with inverse-probability weights, giving unbiased estimates of the attention sums whose variance decreases as the sample grows.
Discussion on Alternative Sampling Schemes. Several sampling schemes can be used to estimate the residual. While we use PPSWOR in our kernel, other choices are possible, and we discuss them below.
PPSWR. Sampling with replacement can be used to estimate the residual in Algorithm 1. Its downside is that keys may be sampled repeatedly. While this matters little statistically at small budgets, it becomes undesirable at large ones; for instance, it does not recover dense attention even when the budget equals that of dense attention. On the other hand, it is easier to analyze: the independence of the samples allows us to apply strong tail bounds, which can be used to devise a verifiable approximation of attention for sparse video generation ([3]).
PPSWOR. Sampling without replacement has several desirable properties for our algorithm. For instance, at large budgets, PPSWOR is guaranteed to cover a larger number of distinct keys. In the limit, it covers all keys for each query and recovers exact dense attention. However, its downside is that the variance of the estimator is difficult to analyze and, consequently, so are analytical guarantees on the approximation error.
Poisson sampling. Poisson sampling is another technique for residual sampling, in which each key is included independently by a separate Bernoulli trial. Its advantage is that the sample is obtained without replacement; however, the sample size equals the budget only in expectation. Nevertheless, the independence again allows us to apply strong tail bounds to the estimators, and thus to obtain a verifiable sparse attention approximation.
These alternative schemes can be seen as extensions of this work, and we leave their exploration to future work.
Experiments
Models. We evaluate InstaGen on two open-source text-to-video diffusion transformers, Wan2.1-T2V-1.3B and Wan2.1-T2V-14B (Wan Team, [14]), generating 81-frame videos at 720p (720 × 1280). After 3D-VAE tokenization, each video has 21 latent frames of 3,600 tokens, so every self-attention call spans 75,600 tokens. We sparsify only self-attention; cross-attention to the text embeddings remains dense.
Metrics. We measure how closely each sparse method reproduces the dense model’s video with Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index Measure (SSIM) (Wang et al., [15]) and Learned Perceptual Image Patch Similarity (LPIPS) (Zhang et al., [22]). Each method is compared with the dense video from the same pipeline on the same hardware. We assess perceptual quality with four VBench (Huang et al., [6]) dimensions: Imaging Quality (ImgQual), Aesthetic Quality (AesQual), Subject Consistency (SubCons) and Background Consistency (BackCons). Efficiency is measured by density, the fraction of query-key pairs computed relative to full attention. Table 1 reports overall density, counting dense warm-up calls as full attention. End-to-end efficiency is measured by wall-clock speedup over dense generation.
| Method | Warm-up | PSNR↑ | SSIM↑ | LPIPS↓ | ImgQual↑ | AesQual↑ | SubCons↑ | BackCons↑ | Density↓ | Speedup↑ | |
| Wan2.1-T2V-1.3B | |||||||||||
| Dense | – | – | – | – | – | 0.6689 | 0.6416 | 0.9569 | 0.9612 | 100% | 1.00× |
| SVG | – | ✓ | 23.62 | 0.794 | 0.214 | 0.6837 | 0.6378 | 0.9489 | 0.9518 | 49.85% | 1.47× |
| SVG2 () | – | ✓ | 26.11 | 0.834 | 0.122 | 0.6185 | 0.6091 | 0.9420 | 0.9495 | 48.92% | 1.65× |
| SVG-EAR | – | ✓ | 28.29 | 0.910 | 0.064 | 0.6625 | 0.6357 | 0.9497 | 0.9543 | 34.87% | 1.63× |
| InstaGen (uniform) | 8+8 | ✓ | 27.12 | 0.856 | 0.093 | 0.6331 | 0.5798 | 0.9411 | 0.9467 | 41.20% | 1.76× |
| InstaGen (uniform) | 16+16 | 26.54 | 0.876 | 0.088 | 0.6718 | 0.6490 | 0.9521 | 0.9596 | 32.00% | 1.68× | |
| InstaGen (uniform) | 16+16 | ✓ | 28.98 | 0.906 | 0.057 | 0.6434 | 0.5976 | 0.9528 | 0.9572 | 52.40% | 1.49× |
| InstaGen (importance) | 8+8 | ✓ | 27.69 | 0.869 | 0.071 | 0.6826 | 0.6272 | 0.9665 | 0.9591 | 41.20% | 1.72× |
| InstaGen (importance) | 16+16 | 27.72 | 0.891 | 0.061 | 0.6909 | 0.6312 | 0.9702 | 0.9673 | 32.00% | 1.63× | |
| InstaGen (importance) | 16+16 | ✓ | 29.39 | 0.906 | 0.053 | 0.6864 | 0.6306 | 0.9701 | 0.9652 | 52.40% | 1.46× |
| Wan2.1-T2V-14B | |||||||||||
| Dense | – | – | – | – | – | 0.6876 | 0.6676 | 0.9677 | 0.9715 | 100% | 1.00× |
| SVG | – | ✓ | 21.01 | 0.742 | 0.202 | 0.6892 | 0.6742 | 0.9653 | 0.9728 | 51.11% | 1.41× |
| SVG2 () | – | ✓ | 22.38 | 0.749 | 0.167 | 0.6927 | 0.6239 | 0.9661 | 0.9704 | 53.34% | 1.53× |
| SVG-EAR | – | ✓ | 23.55 | 0.827 | 0.126 | 0.6848 | 0.6700 | 0.9666 | 0.9677 | 42.19% | 1.48× |
| InstaGen (uniform) | 8+8 | ✓ | 22.91 | 0.771 | 0.136 | 0.6963 | 0.6345 | 0.9763 | 0.9693 | 42.67% | 1.67× |
| InstaGen (uniform) | 16+16 | 19.10 | 0.664 | 0.237 | 0.6792 | 0.6334 | 0.9736 | 0.9748 | 32.00% | 1.63× | |
| InstaGen (uniform) | 16+16 | ✓ | 23.55 | 0.796 | 0.122 | 0.6990 | 0.6361 | 0.9763 | 0.9711 | 53.59% | 1.45× |
| InstaGen (importance) | 8+8 | ✓ | 24.61 | 0.871 | 0.083 | 0.6877 | 0.6701 | 0.9701 | 0.9701 | 42.67% | 1.65× |
| InstaGen (importance) | 16+16 | 21.84 | 0.811 | 0.138 | 0.6858 | 0.6623 | 0.9730 | 0.9753 | 32.00% | 1.58× | |
| InstaGen (importance) | 16+16 | ✓ | 25.50 | 0.887 | 0.072 | 0.6857 | 0.6652 | 0.9699 | 0.9716 | 53.59% | 1.42× |
Table 1. Table 1: Main results on Wan2.1-T2V-1.3B and 14B. PSNR, SSIM and LPIPS compare each video with the dense video from the same seed, and all quality metrics are averaged over the 22 VBench prompts. : exact and sampled share of keys per sparse call with dense warmup, as prescribed by each baseline’s paper; InstaGen uses SVG2’s (first 30% of steps and 3% of layers). Density is overall, counting warmup calls as full attention. Speedup is end-to-end wall-clock on one H100 against a dense run. Bold: best sparse method in each column.
Prompts. We use 22 prompts from the VBench prompt suite (Huang et al., [6]), the two prompts with the most motion from each of its eleven per-dimension lists, as judged by an LLM. Each prompt
is generated once with a fixed seed, shared by all methods. Figure 5 and Figure 6(b) use a single prompt, the first example prompt of SVG2’s released Wan2.1 script [19]. Appendix § 7.§ 1 lists all prompts.

Figure 5. Warmup ablations on Wan2.1-T2V-14B (720p, 81 frames, 50 steps). InstaGen with uniform sampling runs its first 0, 5, 10 or 15 of 50 steps at full attention (warmup), ranging from 4+4% to 32+32% budget. SVG2 runs at its paper configurations at top- 0.1, 0.25, 0.5, 0.75, 0.9 and 0.99. A 5–10 step warmup matches or beats the 15 steps SVG2 uses. The hollow diamond is SVG2 without its one-layer warmup; the InstaGen runs have none. The prompt used is svg2_ex1, Appendix § 7.§ 1.
Baselines. We compare InstaGen against dense attention and three training-free sparse attention methods: the static method SVG [16], which assigns each head a spatial or temporal pattern, and the dynamic methods SVG2 [19], which keeps the -means clusters that reach a top- attention-mass threshold, and SVG-EAR [23], which approximates skipped blocks with centroids and routes by predicted error. Each baseline uses its official configuration and dense warm-up schedule. We evaluate InstaGen with both uniform and importance samplers to compare against these baselines.
Implementation. We implement InstaGen with a fused attention kernel derived from FlashAttention-3 and benchmark on an NVIDIA H100 80GB SXM GPU. All methods use 50 UniPC steps with flow
shift 5.0 and guidance scale 5.0. We set and , running 50 -means iterations at a layer’s first call and two warm-started iterations thereafter [19]. Each query group attends exactly to the top-scoring key blocks within of the keys and estimates the remainder from of the keys, sampled in proportion to their estimated attention mass (§ 3.2.1); we denote this . Both terms are computed in one pass, with importance weights applied as a logit bias. Because InstaGen estimates the omitted attention rather than discarding it, it does not require the dense warm-up used by prior methods. We report it both with and without warm-up, with the first 30% of steps and 3% of layers dense, as in SVG2.
Quality and efficiency evaluation
Attention approximation. We first experiment on one self-attention call captured from a Wan2.1-T2V-1.3B generation. Figure 4(left) shows the mean relative error across all heads in one layer for different methods. Importance sampling has the lowest error at every density: at about 24% of attention computed, its relative error is 0.013, against 0.066 for SVG2 and 0.022 for SVG-EAR, and at about 48% it is 0.004, against 0.033 and 0.014. SVG is a static method, so the error comes via incorrect assumption of attention maps in different attention heads, while the error in other methods is the residual approximation of unselected keys. SVG2 fully drops them, so the error is larger; SVG-EAR and InstaGen both apply different approximation techniques, which lead to relatively lower errors. Figure 4(right) shows the error map across all the layers and heads for the whole generation. Averaged over all steps, InstaGen (uniform, 16+16, no warmup) keeps every head and layer at low error at 32% density, while SVG2 () leaves large errors in individual heads and layers despite computing 46% even with warmup steps.

Figure 4. InstaGen approximates attention more accurately than prior sparse methods. Left: relative error of one self-attention call from Wan2.1-T2V-1.3B against exact attention. Importance sampling gives the lowest error at every density, several times below SVG2. Right: per-block, per-head error over one full generation averaged across all steps. InstaGen (uniform, 16+16, no warm-up) keeps the error low everywhere at 32% density, while SVG2 (, warm-up counted as zero error) leaves large errors in individual heads and layers despite computing 46%.
Video quality. Table 1 reports quality and efficiency across the two models. Both InstaGen variants share the exact set and budget and differ only in how the sample is drawn: uniform draws the shared sample uniformly without replacement, while importance draws in proportion to the scores from the cluster centroids following PPSWOR. On both models, InstaGen (importance, 8+8 with warm-up) improves PSNR over SVG2 by 1.6 dB at 1.3B and 2.2 dB at 14B while using lower density and running faster. On the 14B model it is the best sparse method on all three fidelity metrics, ahead of SVG-EAR at nearly the same density. Without any warm-up, InstaGen still outperforms SVG and SVG2 on the 1.3B model, even though both run with warm-up. Importance sampling improves on uniform sampling at every configuration: drawing residual keys in proportion to their attention weight lowers the estimator’s variance at the same budget.
We compare algorithms at similar density to get a fair comparison of attention approximation of every method. We fix the overall density at that of SVG2’s paper configuration () and give InstaGen (importance) the same budget and warmup, split equally between exact and sampled keys. On Wan2.1-T2V-1.3B (44.1%), InstaGen raises PSNR from 25.03 to 28.42 dB and SSIM from 0.780 to 0.884, and lowers LPIPS from 0.180 to 0.060; on Wan2.1-T2V-14B (54.0%), from 23.40 to 25.41 dB, 0.805 to 0.886, and 0.152 to 0.073. Figure 2(right) shows the curve for quality, where InstaGen envelops SVG2 with both uniform and importance sampling.
Latency. Figure 2 (left) plots quality against generation time on Wan2.1-T2V-1.3B. With importance sampling and no warmup, InstaGen (16+16) reaches 27.72 dB in 173.1 s, 1.6 dB above SVG2’s best setting (, 26.11 dB in 177.0 s); with warmup, InstaGen (8+8) reaches 27.69 dB in 164.6 s, 1.6 dB higher than SVG2’s best in 12.4 s less time. Figure 6(a) shows the density required to match the quality of SVG2, and at that matched quality Figure 6(b) shows the advantage of InstaGen on longer frames, where it gets higher speedups than SVG2.
Warmup. Sparse video methods keep their initial steps dense because early errors steer the whole trajectory. SVG2 runs its first 30% of steps at full attention; SVG and SVG-EAR use similar schedules. Without any warmup, Figure 2 shows that InstaGen with importance sampling lies above SVG2’s entire frontier, and on Wan2.1-T2V-14B (Figure 5) it needs a short warmup, but 10 steps put it above SVG2 at every density. Removing the warmup matters more as videos get longer, because a dense step grows almost quadratically with length (4.6 s at 81 frames, 187.6 s at 561). In Figure 6(b), InstaGen without warmup (14+14) is slower than with warmup (4+4) at 81 frames (164.2 vs. 153.2 s), level at 241 (778.0 vs. 779.5 s) and faster beyond, taking 57.3 against 61.9 min at 561 frames.
Conclusion
This paper proposes InstaGen, which replaces the top- block selection of permuted block-sparse attention with a sampling-based estimate of the full attention. At its core, InstaGen computes an exact set of top-scoring keys in full and estimates the contribution of the remaining keys from a weighted sample, which keeps the estimates of the attention sums unbiased. Parameterized by SVG2, it reuses SVG2’s clustering and block scores and replaces its top- selection. Group-shared sampling makes it fast: each query cluster draws one sample shared by all its queries, so the sampled keys form dense blocks that run with the exact blocks in a single FlashAttention pass.
Across sparse video generation experiments, InstaGen consistently achieves a better quality-efficiency tradeoff than existing methods. On Wan2.1-T2V-1.3B and 14B, InstaGen improves PSNR over SVG2 by 3.4 dB and 2 dB at matched density and by 1.6 dB and 2.2 dB at matched wall-clock time, and on 14B it beats SVG-EAR by 1.1 dB at nearly the same density. On the 1.3B model it needs no dense warmup to outperform SVG2, which matters most for long videos: it denoises a 561-frame video in 57.3 minutes, against 82.8 for SVG2. Because InstaGen treats sparse attention as sampling, other block scorers, such as SVOO’s, can be plugged in. These results demonstrate that importance sampling provides an effective mechanism for allocating a limited attention budget between high-importance tokens and the residual attention mass, and offers a general framework that can be combined with different mechanisms for constructing proxy attention scores.
Supplementary Material
Prompts
Table 2 lists the 22 VBench prompts, two from each of its eleven per-dimension prompt lists, used verbatim for Table 1, Figure 2 and Figure 6(a). The importance-sampling generation times in Figure 2 are measured on the first five (d22-01 to d22-05).
| ID | VBench dimension | Prompt |
| d22-01 | appearance style | a shark is swimming in the ocean by Hokusai, in the style of Ukiyo |
| d22-02 | appearance style | A couple in formal evening wear going home get caught in a heavy downpour with umbrellas, in cyberpunk style |
| d22-03 | color | a red car |
| d22-04 | color | a blue bird |
| d22-05 | human action | A person is riding or walking with horse |
| d22-06 | human action | A person is catching or throwing frisbee |
| d22-07 | multiple objects | a cat and a dog |
| d22-08 | multiple objects | an airplane and a train |
| d22-09 | object class | a train |
| d22-10 | object class | a motorcycle |
| d22-11 | overall consistency | Few big purple plums rotating on the turntable. water drops appear on the skin during rotation. isolated on the white background. close-up. macro. |
| d22-12 | overall consistency | Balloon full of water exploding in extreme slow motion. |
| d22-13 | scene | waterfall |
| d22-14 | scene | highway |
| d22-15 | spatial relationship | a skateboard on the top of a surfboard, front view |
| d22-16 | spatial relationship | a traffic light on the left of a fire hydrant, front view |
| d22-17 | subject consistency | a horse running to join a herd of its kind |
| d22-18 | subject consistency | a bear catching a salmon in its powerful jaws |
| d22-19 | temporal flickering | In a still frame, a tranquil pond was fringed by weeping cherry trees, their blossoms drifting lazily onto the glassy surface |
| d22-20 | temporal flickering | A tranquil tableau of a tranquil lakeside cabin nestled among tall pines, its reflection mirrored perfectly in the calm water |
| d22-21 | temporal style | An astronaut flying in space, racking focus |
| d22-22 | temporal style | A panda drinking coffee in a cafe in Paris, zoom out |
Table 2. The 22 VBench prompts.
Figure 6(b), the 81-frame check that sets the InstaGen budgets in it, and Figure 5 use a single prompt, svg2_ex1, the first example prompt of SVG2’s released Wan2.1 script [19]:
warm colors dominate the room, with a focus on the tabby cat sitting contently in the center. the scene captures the fluffy orange tabby cat wearing a tiny virtual reality headset. the setting is a cozy living room, adorned with soft, warm lighting and a modern aesthetic. a plush sofa is visible in the background, along with a few lush potted plants, adding a touch of greenery. the cat’s tail flicks curiously, as if engaging with an unseen virtual environment. its paws swipe at the air, indicating a playful and inquisitive nature, as it delves into the digital realm. the atmosphere is both whimsical and futuristic, highlighting the blend of analog and digital experiences.
References
- [1]Junsong Chen, Jincheng Yu, Yitong Li, Shuchen Xue, Haozhe Liu, Jingyu Xin, Yuyang Zhao, Tian Ye, Zhangjie Wu, Zian Wang, Daquan Zhou, Ping Luo, Song Han, and Enze Xie. SANA-Video 2.0: Hybrid linear attention with attention residuals for efficient video generation. 2026a. URL https://arxiv.org/abs/2607.21553.
- [2]Junsong Chen, Yuyang Zhao, Jincheng Yu, Ruihang Chu, Junyu Chen, Shuai Yang, Xianbang Wang, Yicheng Pan, Daquan Zhou, Huan Ling, Haozhe Liu, Hongwei Yi, Hao Zhang, Muyang Li, Yukang Chen, Han Cai, Sanja Fidler, Ping Luo, Song Han, and Enze Xie. SANA-Video: Efficient video generation with block linear diffusion transformer. In International Conference on Learning Representations, 2026b. URL https://arxiv.org/abs/2509.24695. Oral.
- [3]Aditya Desai, Kumar Krishna Agrawal, Shuo Yang, Alejandro Cuadron Lafuente, Luis Gaspar Schroeder, Matei Zaharia, Joseph E. Gonzalez, and Ion Stoica. vAttention: Verified sparse attention via sampling. In International Conference on Learning Representations, pp. 52253–52284, 2026. arXiv:2510.05688.arxiv.org/abs/2510.05688
- [4]Shihao Han, Hao Yang, Xiaofeng Mei, Xinting Hu, Yi Jiang, and Xiaojuan Qi. Veda: Scalable video diffusion via distilled sparse attention. In International Conference on Machine Learning, 2026.arxiv.org/abs/2605.30325
- [5]D. G. Horvitz and D. J. Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47(260):663–685, 1952.DOI
- [6]Ziqi Huang, Yinan He, Jiashuo Yu, Fan Zhang, Chenyang Si, Yuming Jiang, Yuanhan Zhang, Tianxing Wu, Qingyang Jin, Nattapol Chanpaisit, Yaohui Wang, Xinyuan Chen, Limin Wang, Dahua Lin, Yu Qiao, and Ziwei Liu. VBench: Comprehensive benchmark suite for video generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 21807–21818, 2024.arxiv.org/abs/2311.17982
- [7]Weijie Kong, Qi Tian, Zijian Zhang, Rox Min, Zuozhuo Dai, Jin Zhou, Jiangfeng Xiong, Xin Li, Bo Wu, Jianwei Zhang, et al. HunyuanVideo: A systematic framework for large video generative models. arXiv preprint arXiv:2412.03603, 2024.arxiv.org/abs/2412.03603
- [8]Haopeng Li, Yitong Li, Junsong Chen, Tian Ye, Haozhe Liu, Jincheng Yu, Duomin Wang, Ruihua Zhang, Zeke Xie, Enze Xie, and Song Han. Sol-Attn: Accelerating video generation inference via on-the-fly attention sparsification, 2026. URL https://arxiv.org/abs/2607.24027. Technical report.
- [9]Xingyang Li, Muyang Li, Tianle Cai, Haocheng Xi, Shuo Yang, Yujun Lin, Lvmin Zhang, Songlin Yang, Jinbo Hu, Kelly Peng, Maneesh Agrawala, Ion Stoica, Kurt Keutzer, and Song Han. Radial attention: O(n log n) sparse attention with energy decay for long video generation. arXiv preprint arXiv:2506.19852, 2025.arxiv.org/abs/2506.19852
- [10]Jiayi Luo, Jiayu Chen, Jiankun Wang, Cong Wang, Hanxin Zhu, Qingyun Sun, Chen Gao, Zhibo Chen, and Jianxin Li. Attention sparsity is input-stable: Training-free sparse attention for video generation via offline sparsity profiling and online QK co-clustering, 2026. URL https://arxiv.org/abs/2603.18636. Accepted to ICML 2026.
- [11]Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, and Tri Dao. FlashAttention-3: Fast and accurate attention with asynchrony and low-precision. In Advances in Neural Information Processing Systems, volume 37, 2024. doi: 10.52202/079017-2193.
- [12]Pardis Taghavi, Reza Langari, and Gaurav Pandey. Partition the support, reconstruct the residual: Training-free sparse attention for video generation and world models, 2026. URL https://arxiv.org/abs/2608.18484.
- [13]Haoyue Tan, Shengnan Wang, Yulin Qiao, Juncheng Zhang, Youhui Bai, Ping Gong, Zewen Jin, and Cheng Li. AdaCluster: Adaptive query-key clustering for sparse attention in video generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 43249–43259, 2026.arxiv.org/abs/2604.18348
- [14]Wan Team. Wan: Open and advanced large-scale video generative models, 2025. URL https://arxiv.org/abs/2503.20314.
- [15]Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli. Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600–612, 2004.pubmed.ncbi.nlm.nih.gov/15376593
- [16]Haocheng Xi, Shuo Yang, Yilong Zhao, Chenfeng Xu, Muyang Li, Xiuyu Li, Yujun Lin, Han Cai, Jintao Zhang, Dacheng Li, Jianfei Chen, Ion Stoica, Kurt Keutzer, and Song Han. Sparse Video-Gen: Accelerating video diffusion transformers with spatial-temporal sparsity. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 68208–68224, 2025.arxiv.org/abs/2502.01776
- [17]Yifei Xia, Suhan Ling, Fangcheng Fu, Yujie Wang, Huixia Li, Xuefeng Xiao, and Bin Cui. Training-free and adaptive sparse attention for efficient long video generation. In 2025 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 15982–15993. IEEE, 2025.arxiv.org/abs/2502.21079
- [18]Ruyi Xu, Guangxuan Xiao, Haofeng Huang, Junxian Guo, and Song Han. XAttention: Block sparse attention with antidiagonal scoring. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 69819–69831. PMLR, 2025. URL https://proceedings.mlr.press/v267/xu25ag.html.arxiv.org/abs/2503.16428
- [19]Shuo Yang, Haocheng Xi, Yilong Zhao, Muyang Li, Jintao Zhang, Han Cai, Yujun Lin, Xiuyu Li, Chenfeng Xu, Kelly Peng, Jianfei Chen, Song Han, Kurt Keutzer, and Ion Stoica. Sparse VideoGen2: Accelerate video generation with sparse attention via semantic-aware permutation. In Advances in Neural Information Processing Systems, volume 38, pp. 96965–96991, 2025a. doi: 10.52202/085713-3243.DOI
- [20]Zhuoyi Yang, Jiayan Teng, Wendi Zheng, Ming Ding, Shiyu Huang, Jiazheng Xu, Yuanming Yang, Wenyi Hong, Xiaohan Zhang, Guanyu Feng, et al. CogVideoX: Text-to-video diffusion models with an expert transformer. In International Conference on Learning Representations, volume 2025, pp. 83048–83077, 2025b.arxiv.org/abs/2408.06072
- [21]Jintao Zhang, Chendong Xiang, Haofeng Huang, Jia Wei, Haocheng Xi, Jun Zhu, and Jianfei Chen. SpargeAttention: Accurate and training-free sparse attention accelerating any model inference. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 76397–76413, 2025.arxiv.org/abs/2502.18137
- [22]Richard Zhang, Phillip Isola, Alexei A. Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 586–595, 2018.arxiv.org/abs/1801.03924
- [23]Xuanyi Zhou, Qiuyang Mang, Shuo Yang, Haocheng Xi, Jintao Zhang, Huanzhi Mao, Joseph E. Gonzalez, Kurt Keutzer, Ion Stoica, and Alvin Cheung. SVG-EAR: Parameter-free linear compensation for sparse video generation via error-aware routing. arXiv preprint arXiv:2603.08982, 2026. URL https://arxiv.org/abs/2603.08982. Accepted to ECCV 2026.


