HiLo-Token: 输入自适应的高低频令牌压缩用于高效图像编辑
HiLo-Token: Input-Adaptive High-Low Frequency Token Compression for Efficient Image Editing Model Serving
AI总结:
针对扩散变换器(DiT)在图像编辑中延迟高的问题,提出输入自适应的令牌压缩框架HiLo-Token,根据空间频率分配令牌预算,在保持生成质量的同时实现高达3.13倍加速。
摘要:
创意图像编辑工具,如Photoshop的移除或生成填充按钮,是日常客户使用的核心,并占Photoshop和Lightroom流量的主要部分。然而,当前的生成式AI模型面临显著的延迟挑战,当从基于卷积的U-Net过渡到扩散变换器(DiT)时,这一问题变得更加突出。在我们对数百个代表性图像编辑样本(涵盖广泛的掩码比例)的评估中,即使将DiT模块从50个时间步蒸馏到8个时间步,它单独就占总模型延迟的平均73%。为了应对这一挑战,我们提出了$\textbf{HiLo-Token}$,一个输入自适应的令牌压缩框架,该框架将更多令牌预算分配给高频、丰富上下文的区域,同时将更少令牌分配给低频区域。具体来说,对于用户掩码指定的编辑区域,我们保留膨胀掩码内的所有令牌,以保持强局部性和上下文相关性。在编辑区域之外,我们引入了一种简单而有效的基于空间频率的高频令牌选择策略,以捕获重要的局部细节,同时使用来自16倍下采样图像的令牌来表示低频分量,并保留模糊但全局的结构。在生产级评估数据上的大量实验验证了所提方法的有效性,在A100-80GB上,对于小、中、大掩码比例类别(平均比例分别为6.38%、15.92%和35.36%),图像编辑任务分别实现了3.13倍、2.59倍和1.67倍的DiT加速,且生成质量无任何退化。
英文摘要:
Creative image editing tools, such as Adobe Photoshop's Remove and Generative Fill buttons, are central to everyday customer use and account for a major share of traffic. However, current generative AI models face significant latency challenges, which become even more pronounced as the field transitions from convolution-based U-Nets to Diffusion Transformers (DiTs). In our evaluation on hundreds of representative image editing samples spanning a wide range of mask ratios, the DiT module alone accounts for an average of 73% of the total model latency, even after being distilled from 50 timesteps down to 8 timesteps. To tackle this challenge, we propose $\textbf{HiLo-Token}$, an input-adaptive token compression framework that allocates a larger token budget to high-frequency, rich-context regions while assigning fewer tokens to low-frequency areas. Specifically, for the editing region specified by the user mask, we retain all tokens within a dilated mask to preserve strong locality and contextual relevance. Outside the editing region, we introduce a simple yet effective high-frequency token selection strategy based on spatial frequency to capture important local details, while using tokens from a heavily downsampled image to represent low-frequency components and preserve the coarse global structure. Extensive experiments on production-level evaluation data validate the effectiveness of the proposed method, which achieves 3.13$\times$, 2.59$\times$, and 1.67$\times$ DiT speedups on A100-80GB for image editing tasks across small, medium, and large mask ratio categories with average ratios of 6.38%, 15.92%, and 35.36%, respectively, without any regression in generation quality. In production, where the editing pipeline is served as disaggregated, independently autoscaled GPU workers, these per-request savings translate into a 33% reduction in the GPUs required to serve the models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。