InstaGen: Group-Shared Importance Sampling for Fast Video Generation

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.

扩散变换器(DiTs)是视频生成领域的主流架构,但其二次方的注意力复杂度导致了巨大的计算成本和延迟。置换块稀疏注意力(PBSA)通过选择性地计算语义置换注意力矩阵中的块,为降低这一成本提供了一种有前景的方法。

However, existing approaches typically select only the top few key blocks for each query block, following a top-$p$ paradigm. We find that top-$p$ 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.

然而,现有的方法通常遵循 top-$p$ 范式,仅为每个查询块选择前几个关键块。我们发现,在视频生成中常见的高熵注意力机制下,top-$p$ 选择的采样效率可能非常低。在这些机制中,我们证明了在相同的计算预算下,采样可以提供明显更好的近似效果。

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.

更广泛地说,我们将块选择视为重要性采样,其中得分最高的键构成一个完整计算的精确集,而其余的键则由根据其估计注意力比例抽取的样本表示,并按逆采样概率进行加权。基于这一公式,我们提出了 InstaGen,它可以由任何 PBSA 方法进行参数化:它将该方法的块选择替换为一个精确集加上一个加权样本。

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.

每个查询簇抽取一个由其所有查询共享的样本,因此采样的键形成了适合高效 GPU 执行的块。在本文中,我们以 SVG 系列 PBSA 方法为例,展示了在 Wan2.1-T2V-1.3B 和 Wan2.1-T2V-14B 模型上,由 SVG2 参数化的 InstaGen 在匹配注意力密度的情况下,PSNR 分别比 SVG2 提高了 3.4 dB 和 2 dB;在匹配挂钟时间的情况下,分别提高了 1.6 dB 和 2.2 dB。

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

在 Wan2.1-T2V-14B 上,InstaGen 在几乎相同的密度下,PSNR 也比 SVG-EAR 高出 1.1 dB,同时运行速度更快(相对于密集计算的 1.65 倍对 1.48 倍)。