Skip to content
xdit-projectPublic

About

xDiT: A Scalable Inference Engine for Diffusion Transformers (DiTs) with Massive Parallelism

Resources

Stars

2.8k stars

Watchers

81 watching

Forks

Repository files navigation

xDiT

Distributed inference for diffusion transformers

Documentation site · Quick start · Supported models · Discussions · Papers

Discord

xDiT

xDiT runs image, video, and audiovisual diffusion models on one or more devices. The xdit CLI selects a model, configures parallel execution, and saves generated outputs and measurements. Features vary by model and hardware; start with the supported-model and capability tables.

Choose model inputs, device layout and optional tuning; xDiT coordinates inference and saves outputs and measurements

Quick start

Install

Install PyTorch for your device, then install xDiT:

pip install xfuser
# Optional: Cache-DiT caching and TorchAO quantization
pip install "xfuser[cache-dit,torchao]"

The base package includes DistVAE and Yunchang. Some models require newer Diffusers or Transformers than the package minimum. See the installation guide for source builds, optional packages, and CUDA, ROCm, and Ascend containers.

Run a model

Choose a model from the supported-model list. This example uses FLUX.1-dev on one GPU with enough memory for its weights:

xdit --model FLUX.1-dev --prompt "A cat running in a garden"

Accept the checkpoint's license and authenticate with Hugging Face if required. The first run downloads the weights. To distribute attention across eight GPUs:

xdit --model FLUX.1-dev --ulysses_degree 8 \
    --prompt "A cat running in a garden"

The launcher infers the process count from the parallel degrees. See launching, legacy pipeline examples, and the CLI reference for other workflows and options.

Choose capabilities

Goal Guide
Scale inference across GPUs Ulysses and Ring, hybrid layouts
Fit models and high-resolution outputs in memory Sharding and offload, parallel VAE
Tune kernels, compute, and communication Attention, quantization, communication
Reuse denoising work Caching
Adapt, measure, compile, and profile LoRA, benchmarking

Check the model capability matrix before combining features. Quantization, caching, and reduced-precision communication can change output quality; compare results on your workload.

Integrations and resources

Contribute

Start with adding a model and framework design. Use discussions for questions and issues for reproducible problems.

📝 Cite Us

xDiT: an Inference Engine for Diffusion Transformers (DiTs) with Massive Parallelism

@article{fang2024xdit,
  title={xDiT: an Inference Engine for Diffusion Transformers (DiTs) with Massive Parallelism},
  author={Fang, Jiarui and Pan, Jinzhe and Sun, Xibo and Li, Aoyu and Wang, Jiannan},
  journal={arXiv preprint arXiv:2411.01738},
  year={2024}
}

PipeFusion: Patch-level Pipeline Parallelism for Diffusion Transformers Inference

@inproceedings{
    fang2025pipefusion,
    title={PipeFusion: Patch-level Pipeline Parallelism for Diffusion Transformers Inference},
    author={Jiarui Fang and Jinzhe Pan and Aoyu Li and Xibo Sun and WANG Jiannan},
    booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
    year={2025},
    url={https://openreview.net/forum?id=5xwyxupsLL}
}

USP: A Unified Sequence Parallelism Approach for Long Context Generative AI

@article{fang2024unified,
  title={A Unified Sequence Parallelism Approach for Long Context Generative AI},
  author={Fang, Jiarui and Zhao, Shangchun},
  journal={arXiv preprint arXiv:2405.07719},
  year={2024}
}

Unveiling Redundancy in Diffusion Transformers (DiTs): A Systematic Study

@article{sun2024unveiling,
  title={Unveiling Redundancy in Diffusion Transformers (DiTs): A Systematic Study},
  author={Sun, Xibo and Fang, Jiarui and Li, Aoyu and Pan, Jinzhe},
  journal={arXiv preprint arXiv:2411.13588},
  year={2024}
}

About

xDiT: A Scalable Inference Engine for Diffusion Transformers (DiTs) with Massive Parallelism

Resources

Stars

2.8k stars

Watchers

81 watching

Forks

Releases

Packages

Used by

Contributors

Languages