StreamFusion: Scalable Sequence Parallelism for Distributed Inference of Diffusion Transformers on GPUs

Jiacheng Yang, Jun Wu, Yaoyao Ding, Zhiying Xu, Yida Wang, Gennady Pekhimenko · DOI

Diffusion Transformers (DiTs) are the powerhouses behind the latest generation of "wow-factor" AI, from the hyper-realistic images of Flux to the cinematic clips of CogVideoX. But there’s a catch: as we push for higher resolutions and longer videos, the "sequence length" (the amount of data the model processes at once) explodes. A single GPU quickly runs out of memory, and even clusters of GPUs often spend more time "talking" to each other than actually computing.

Enter StreamFusion, a new serving engine designed to make distributed DiT inference significantly more efficient by rethinking how GPUs communicate.

TL;DR

StreamFusion is a serving engine that speeds up Diffusion Transformer inference by an average of 1.35x (and up to 1.77x). It achieves this by matching communication patterns to the physical layout of GPU clusters, overlapping data transfers with math, and using "one-sided" communication to cut down on synchronization lag.

What Problem Does This Paper Address?

When you spread an AI model across multiple GPUs, you use Sequence Parallelism (SP). Current methods like Ulysses Attention and Ring Attention (or their combination, USP) have three major "bottlenecks":

  1. Topology Blindness: They don't always account for the fact that GPUs inside the same box (connected by fast NVLink) talk much faster than GPUs in different boxes (connected by slower Ethernet or InfiniBand).
  2. The "All-to-All" Wall: Ulysses Attention uses "all-to-all" operations that force the GPU to wait until all data has arrived before it starts calculating.
  3. Synchronization Tax: Standard communication libraries (like NCCL) require strict handshakes between senders and receivers. This creates "bubbles" of idle time where GPUs sit around waiting for a green light.

Methods

The authors introduce three key innovations to break these bottlenecks:

  • Topology-Aware Sequence Parallelism: Unlike previous methods, StreamFusion uses Ulysses Attention for inter-machine communication (because it sends less total data) and Ring Attention for intra-machine communication (to exploit high-bandwidth local links).
  • Torus Attention: This is a clever scheduling algorithm. The authors noticed that during an "all-to-all" swap, some data actually stays on the local GPU. Torus Attention starts computing on that "stationary" data immediately while the rest of the data is still flying across the network.
  • One-Sided Communication (NVSHMEM): Instead of traditional "send-receive" (two-sided) communication, StreamFusion uses "push-pull" (one-sided) operations. This allows a GPU to grab the data it needs from a neighbor's memory without waiting for the neighbor to explicitly "send" it, drastically reducing synchronization overhead.

Datasets & Workloads

The researchers evaluated StreamFusion using state-of-the-art DiT models on AWS p4de.24xlarge instances (A100 GPUs):

  • Flux (12B parameters): Used for generating massive images at $3072 \times 3072$ and $4096 \times 4096$ resolutions.
  • CogVideoX (5B parameters): Used for generating 20-second and 40-second high-definition videos ($768 \times 1360$).
  • Micro-benchmarks: They also tested varying sequence lengths (up to 192k tokens) and head dimensions to see how the system scales.

Key Insights and Ideas

  • The Volume vs. Bandwidth Tradeoff: The "aha moment" here is realizing that while Ulysses Attention is harder to implement, it produces lower communication volume as you add more machines. By putting Ulysses on the slow inter-machine links, they minimize the bottleneck where it hurts most.
  • Hiding Latency in Plain Sight: By breaking the attention mechanism into chunks, Torus Attention effectively "hides" the network delay. By the time the GPU finishes calculating the first chunk of data it already had, the next chunk has arrived over the wire.
  • Removing the Handshake: Moving from NCCL to NVSHMEM is like moving from a phone call (where both people must be on the line) to a mailbox (where you just drop off the letter and leave). This flexibility allows the GPU to keep its "Streaming Multiprocessors" (SMs) busy with math rather than managing network traffic.

Key Results

  • Significant Speedups: StreamFusion outperformed the previous state-of-the-art (USP) by an average of 1.35x.
  • Scaling Success: In the most demanding scenarios (like 40-second video generation), the speedup reached 1.77x.
  • Efficiency: The "Topology-Aware" scheduling alone provided a 1.27x boost, proving that simply being "smarter" about which GPU talks to which can yield massive gains.
  • Compute-Bound vs. Comm-Bound: As sequence lengths get extremely long (e.g., >160k tokens), the system becomes "compute-bound" (the math takes longer than the talking), which naturally narrows the gap between methods, but StreamFusion still maintains a lead.

Limitations and Future Work

  • Workload Sensitivity: The benefits of Torus Attention are most visible in video generation with very long sequences. For shorter image generation tasks, the communication volume isn't always large enough for the overlapping to provide a massive boost.
  • Hardware Specifics: The current implementation is heavily optimized for NVIDIA's Ampere architecture and NVSHMEM. While the concepts apply to other hardware (like AMD or specialized AI chips), the code would need significant porting.
  • Compiler Integration: The authors suggest that StreamFusion could be integrated into automated compilers like Triton, which would allow these optimizations to be applied automatically to new model architectures without manual tuning.

Summary updated

BibTeX
@misc{yang2026streamfusion,
  author = {Jiacheng Yang and Jun Wu and Yaoyao Ding and Zhiying Xu and Yida Wang and Gennady Pekhimenko},
  title = {{StreamFusion: Scalable Sequence Parallelism for Distributed Inference of Diffusion Transformers on GPUs}},
  year = {2026},
  eprint = {2601.20273},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.20273},
}
Figure