arXiv:2611.08610cs.CVNov 2026

Manuscript Offprint

arXiv:2611.08610

InstaGen: Group-Shared Importance Sampling for Fast Video Generation

Kislay Aditya Oj, Kumar Krishna Agrawal, Sri Surya Varma Datla, Aditya Desai

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Kislay Aditya Oj¹,* Kumar Krishna Agrawal²,* Sri Surya Varma Datla¹ Aditya Desai¹

¹Computer Science and Engineering, Indian Institute of Technology Bombay, India ²Electrical Engineering and Computer Sciences, University of California, Berkeley, USA

Figure

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 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.

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-pp paradigm. We find that top-pp 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).

*Equal contribution. Correspondence: kislay@cse.iitb.ac.in, apdesai@iitb.ac.in

Figure

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 (Cq=100C_q=100, Ck=500C_k=500, full attention for the first 30% of steps, key floor 0.1) at top-pp 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.

1 INTRODUCTION

Diffusion Transformers (DiTs) have been instrumental in achieving state-of-the-art quality in image and video generation (Wan Team, 2025; Yang et al., 2025b; Kong et al., 2024). 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 (Shah et al., 2024) 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 (Yang et al., 2025a; Zhou et al., 2026) have primarily focused on addressing the first two goals through clustering query and key tokens, permitting 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-pp as the underlying sparsification strategy. However, for high-entropy attention distributions, top-pp ends up retaining a large number of tokens. Thus, the top-pp 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-pp 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 (Horvitz & Thompson, 1952). Top-k 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; Section 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-p selection. This choice is not a requirement, and the same estimator can be applied to other methods that produce block scores, such as SVOO (Luo et al., 2026).

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 (Xi et al., 2025), 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 (Wang et al., 2004), LPIPS (Zhang et al., 2018)) and video quality with VBench (Huang et al., 2024). 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, Section 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).

References (23)