arXiv:2505.12849cs.CV2025-05被引 2

用改进的迭代方法让TarFlow图像生成速度提升近5倍,且不损失质量。

Accelerate TarFlow Sampling with GS-Jacobi Iteration

论文配图:Accelerate TarFlow Sampling with GS-Jacobi Iteration
图 1 · 摘自论文原文
  • 引入GS-Jacobi迭代,优化关键模块的收敛路径。
  • 在四个数据集上实现2.5倍至5.3倍加速,FID分数不变。
  • 适合需要快速生成高质量图像的研究者和开发者。

图像生成模型应用广泛,例如将Transformer与归一化流结合的TarFlow模型在多个基准测试中表现领先。然而,由于注意力机制的因果结构导致采样过程需串行计算,其生成速度极慢。本文提出通过一系列优化策略,利用高斯-赛德尔-雅可比(GS-Jacobi)迭代方法显著加速采样。研究发现TarFlow模型中的模块重要性不同:少数关键模块主导生成效果,其余贡献较小;部分模块对初始值敏感易溢出,另一些则较稳定。据此提出收敛排序度量(CRM)和初始猜测度量(IGM),分别用于识别模块是否“简单”或“困难”,以及初始值是否合适。在四个TarFlow模型上的实验表明,使用GS-Jacobi采样可在保持图像质量(以FID衡量)的前提下大幅提升效率:Img128cond加速4.53倍,AFHQ加速5.32倍,Img64uncond加速2.96倍,Img64cond加速2.51倍。代码与模型权重已开源。

原文摘要 · Abstract (English)

Image generation models have achieved widespread applications. As an instance, the TarFlow model combines the transformer architecture with Normalizing Flow models, achieving state-of-the-art results on multiple benchmarks. However, due to the causal form of attention requiring sequential computation, TarFlow's sampling process is extremely slow. In this paper, we demonstrate that through a series of optimization strategies, TarFlow sampling can be greatly accelerated by using the Gauss-Seidel-Jacobi (abbreviated as GS-Jacobi) iteration method. Specifically, we find that blocks in the TarFlow model have varying importance: a small number of blocks play a major role in image generation tasks, while other blocks contribute relatively little; some blocks are sensitive to initial values and prone to numerical overflow, while others are relatively robust. Based on these two characteristics, we propose the Convergence Ranking Metric (CRM) and the Initial Guessing Metric (IGM): CRM is used to identify whether a TarFlow block is "simple" (converges in few iterations) or "tough" (requires more iterations); IGM is used to evaluate whether the initial value of the iteration is good. Experiments on four TarFlow models demonstrate that GS-Jacobi sampling can significantly enhance sampling efficiency while maintaining the quality of generated images (measured by FID), achieving speed-ups of 4.53x in Img128cond, 5.32x in AFHQ, 2.96x in Img64uncond, and 2.51x in Img64cond without degrading FID scores or sample quality. Code and checkpoints are accessible on https://github.com/encoreus/GS-Jacobi_for_TarFlow

图像生成加速采样迭代优化归一化流

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。