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.
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.
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.
| 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.
- xDiT ComfyUI: model loading and generation through ComfyUI.
- Legacy model examples.
- External model integrations: StepVideo and Mochi use separate launchers.
- Container builds and workload configurations: CUDA, Instinct, and RDNA 4 environments.
- Community resources, including Google Cloud serving and ROCm recipes.
Start with adding a model and framework design. Use discussions for questions and issues for reproducible problems.
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}
}