NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DistriFusion: Distributed Parallel Inference for High-Resolution Diffusion Models

Muyang Li, Tianle Cai, Jiaxin Cao, Qinsheng Zhang, Han Cai, Junjie Bai, Yangqing Jia, Ming-Yu Liu, Kai Li, Song HanCVPR 2024

Abstract

Diffusion models have achieved great success in synthesizing high-quality images. However, generating high-resolution images with diffusion models is still challenging due to the enormous computational costs, resulting in a prohibitive latency for interactive applications. In this paper, we propose DistriFusion to tackle this problem by leveraging parallelism across multiple GPUs. Our method splits the model input into multiple patches and assigns each patch to a GPU. However, naïvely implementing such an algorithm breaks the interaction between patches and loses fidelity, while incorporating such an interaction will incur tremendous communication overhead. To overcome this dilemma, we observe the high similarity between the input from adjacent diffusion steps and propose displaced patch parallelism, which takes advantage of the sequential nature of the diffusion process by reusing the pre-computed feature maps from the previous timestep to provide context for the current step. Therefore, our method supports asynchronous communication, which can be pipelined by computation. Extensive experiments show that our method can be applied to recent Stable Diffusion XL with no quality degradation and achieve up to a 6.1× speedup on eight A100 GPUs compared to one.

Introduction

High-resolution image generation using models like Stable Diffusion XL (SDXL) offers impressive visual fidelity but suffers from significant latency, often exceeding 10 seconds for a single 1024x1024 image. While multi-GPU clusters are increasingly available, traditional parallelization techniques face two major hurdles in the context of diffusion models. First, standard tensor parallelism requires frequent, high-bandwidth communication of large spatial activation maps, which often becomes a bottleneck. Second, simple patch-based parallelization—where the image is split into independent regions—leads to "seams" and duplicated subjects because the patches fail to interact globally.

Methodology: Displaced Patch Parallelism

DistriFusion introduces Displaced Patch Parallelism to enable efficient multi-GPU inference without sacrificing image quality. The approach is built on several key innovations:

  1. Patch Splitting and Activation Displacement: The input image is divided into $N$ patches, each assigned to a different GPU. To maintain global context without synchronous communication, DistriFusion utilizes activations from the previous denoising step ($t+1$) to provide context for the current step ($t$). This is justified by the high temporal similarity between adjacent diffusion steps (averaging only 0.02 difference).
  2. Asynchronous Pipelining: By using "stale" context from the previous step, communication can be performed asynchronously. While a GPU computes a layer for the current step, it simultaneously broadcasts its results from the previous layer to be used by other GPUs in the subsequent step, effectively hiding communication latency.
  3. Corrected GroupNorm: To avoid synchronization barriers in normalization layers, DistriFusion uses a mathematical correction term that approximates global statistics using a combination of fresh local data and stale global data.
  4. Warm-up Phase: The initial steps of the diffusion process, which determine the global layout, are performed using standard synchronous communication to ensure structural integrity before transitioning to the faster displaced mode.

Experimental Results

The researchers evaluated DistriFusion using SDXL on the COCO Captions 2014 dataset. The method demonstrates a significant reduction in latency while maintaining perceptual quality.

Comparison of DistriFusion against single-GPU and naive parallelization baselines.

As shown in the figure above, naive parallelization across 4 GPUs results in severe artifacts, such as duplicated subjects, despite a 3.9× speedup. In contrast, DistriFusion achieves a 3.0× speedup (4.16s vs 12.3s) with no visible quality degradation. On 8 NVIDIA A100 GPUs, the speedup reaches up to 6.1× for ultra-high-resolution (3840×3840) images. Quantitatively, DistriFusion maintains an FID score of ~24.3, nearly identical to the single-GPU baseline (24.0), whereas naive patching degrades the FID to 33.6.

Discussion and Limitations

DistriFusion is a training-free algorithm, allowing it to be applied directly to off-the-shelf models like SDXL. However, its effectiveness depends on hardware interconnects; slower networks may not fully hide communication overhead. Additionally, the "stale feature" assumption is less effective for "lightning" models with very few steps (e.g., < 10), where features change rapidly between iterations. Future work may explore adaptive context updating to support these low-step regimes.

This summary is based on research from MIT, Princeton, Lepton AI, and NVIDIA.

Summary updated

BibTeX
@inproceedings{li2024distrifusion,
  author = {Muyang Li and Tianle Cai and Jiaxin Cao and Qinsheng Zhang and Han Cai and Junjie Bai and Yangqing Jia and Ming-Yu Liu and Kai Li and Song Han},
  title = {{DistriFusion: Distributed Parallel Inference for High-Resolution Diffusion Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  url = {https://openreview.net/forum?id=EWbinUjQqZ},
}
Figure