arXiv:2602.10940cs.CV2026-02

优化扩散模型分布式推理,提速1.16倍

FastUSP: A Multi-Level Collaborative Acceleration Framework for Distributed Diffusion Model Inference

  • 分层优化:编译、通信、算子三层面协同加速
  • 在120亿参数模型上实现1.12至1.16倍端到端提速
  • 适合大规模生成模型部署者与系统优化研究者

FLUX(12B参数)和Stable Diffusion 3(8B参数)等大型扩散模型需多GPU并行推理。统一序列并行(USP)结合Ulysses与Ring注意力机制,是当前分布式注意力计算的主流方法。但现有USP实现存在内核启动开销大、计算-通信调度不优等问题。本文提出FastUSP,一个多层次优化框架,融合编译级优化(使用CUDA Graphs的图编译与计算-通信重排序)、通信级优化(FP8量化集体通信)及算子级优化(双缓冲流水线Ring注意力)。我们在FLUX(12B)和Qwen-Image模型上,于2、4、8张NVIDIA RTX 5090 GPU上评估。在FLUX上,FastUSP相较基线USP实现1.12×–1.16×的端到端加速,其中编译优化贡献最大;在Qwen-Image上,2卡时获1.09×加速;4–8卡时因PyTorch Inductor与Ring注意力兼容性问题,编译优化失效,基线USP则达2卡性能的1.30×–1.46×。我们进一步分析发现,在现代高带宽GPU互连下,内核启动开销而非通信延迟才是主要瓶颈。

原文摘要 · Abstract (English)

Large-scale diffusion models such as FLUX (12B parameters) and Stable Diffusion 3 (8B parameters) require multi-GPU parallelism for efficient inference. Unified Sequence Parallelism (USP), which combines Ulysses and Ring attention mechanisms, has emerged as the state-of-the-art approach for distributed attention computation. However, existing USP implementations suffer from significant inefficiencies including excessive kernel launch overhead and suboptimal computation-communication scheduling. In this paper, we propose \textbf{FastUSP}, a multi-level optimization framework that integrates compile-level optimization (graph compilation with CUDA Graphs and computation-communication reordering), communication-level optimization (FP8 quantized collective communication), and operator-level optimization (pipelined Ring attention with double buffering). We evaluate FastUSP on FLUX (12B) and Qwen-Image models across 2, 4, and 8 NVIDIA RTX 5090 GPUs. On FLUX, FastUSP achieves consistent \textbf{1.12$\times$--1.16$\times$} end-to-end speedup over baseline USP, with compile-level optimization contributing the dominant improvement. On Qwen-Image, FastUSP achieves \textbf{1.09$\times$} speedup on 2 GPUs; on 4--8 GPUs, we identify a PyTorch Inductor compatibility limitation with Ring attention that prevents compile optimization, while baseline USP scales to 1.30$\times$--1.46$\times$ of 2-GPU performance. We further provide a detailed analysis of the performance characteristics of distributed diffusion inference, revealing that kernel launch overhead -- rather than communication latency -- is the primary bottleneck on modern high-bandwidth GPU interconnects.

扩散模型分布式推理加速框架GPU优化

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