AI画图太慢?新方法让模型瘦身不降质
现在的AI画图模型(比如FLUX、Wan)虽然画得好,但跑一次要算很多步,参数又多,普通显卡根本跑不动。通常的解决办法是“量化”——把模型里的数字精度降低,让它变快变省内存。但问题来了:AI画图时,不同步骤、不同提示词、甚至不同分支(比如引导图)里的数据分布都不一样,以前的方法得针对每种情况重新校准,换个模型或从图片换成视频就得重来一遍。这篇论文搞了个新招:先把数据旋转到一个“归一化”的坐标系里,让所有数据都乖乖集中在几个固定的数值附近,这样用一个通用的“字典”就能量化所有情况,不用再反复校准。而且他们把旋转操作巧妙地融进了模型权重里,运行时只多一步旋转,几乎不增加计算量。结果在多个模型上,用极低的精度(比如权重2比特、激活4比特)还能生成可用的图片和视频。它不是你明天就能直接用的工具,但它让AI画图在普通设备上跑得更快成为可能,是前沿技术的重要一步。
📄 原文摘要(英文)
Diffusion transformers (DiTs) achieve state-of-the-art image and video generation, but their multi-step sampling and growing parameter count make inference expensive. Post-training quantization (PTQ) is the natural remedy, yet DiT activations shift across timesteps, prompts, and guidance branches, forcing prior methods to re-fit calibration data for every new checkpoint or modality. We present OrbitQuant, a data-agnostic weight-activation quantizer that bypasses range estimation by quantizing in a normalized, rotated basis. In this basis, a randomized permuted block-Hadamard (RPBH) rotation concentrates each coordinate around one fixed, known marginal regardless of the input, so a single Lloyd-Max codebook serves all timesteps, prompts, and layers of a given input dimension. We extend the same quantizer to weight rows offline, absorbing the rotation into the weights so that it cancels inside each linear layer and only a forward rotation on the activations remains at runtime. The same recipe transfers from image to video with no per-modality tuning. Across FLUX.1, Z-Image-Turbo, Wan 2.1, and CogVideoX, it sets the state of the art for PTQ at several low-bit settings. It also pushes PTQ of image diffusion transformers to W2A4 with usable generation quality.