mlsanityData to 14 Oct 2026

KnapFormer: An Online Load Balancer for Efficient Diffusion Transformers Training

arXiv 2508.06001 ↗First posted 8 Aug 2025cs.DC cs.CVcited by 3

On the map: Diffusion models → Diffusion foundations and sampling

Abstract (arXiv)

We present KnapFormer, an efficient and versatile framework to combine workload balancing and sequence parallelism in distributed training of Diffusion Transformers (DiT). KnapFormer builds on the insight that strong synergy exists between sequence parallelism and the need to address the significant token imbalance across ranks. This imbalance arises from variable-length text inputs and varying visual token counts in mixed-resolution and image-video joint training. KnapFormer redistributes tokens by first gathering sequence length metadata across all ranks in a balancing group and solving a global knapsack problem. The solver aims to minimize the variances of total workload per-GPU, while accounting for the effect of sequence parallelism. By integrating DeepSpeed-Ulysees-based sequence parallelism in the load-balancing decision process and utilizing a simple semi-empirical workload model, KnapFormers achieves minimal communication overhead and less than 1% workload discrepancy in real-world training workloads with sequence length varying from a few hundred to tens of thousands. It eliminates straggler effects and achieves 2x to 3x speedup when training state-of-the-art diffusion models like FLUX on mixed-resolution and image-video joint data corpora. We open-source the KnapFormer implementation at https://github.com/Kai-46/KnapFormer/

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Diffusion foundations and sampling, one of 14 directions in Diffusion models. Builds on 22 of its 30 references that are in the map. First posted on arXiv 8 Aug 2025.

Builds on

22 of 30 references.

Closest ancestors · 3

Same direction, newest first

  1. 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesis5 Mar
  2. 2023Matryoshka Diffusion Models23 Oct
  3. 2022Scalable Diffusion Models with Transformers19 Dec

Other references · 19

  1. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  2. 2025Qwen3 Technical Reportcited by 8,820
  3. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  4. 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
  5. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  6. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
  7. 2024Mixtral of Expertscited by 1,823
  8. 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,631
  9. 2025Emerging Properties in Unified Multimodal Pretrainingcited by 897
  10. 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Modelscited by 867
  11. 2024Transfusion: Predict the Next Token and Diffuse Images with One Multi-Modal Modelcited by 483
  12. 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
7 more
  1. 2023DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Modelscited by 245
  2. 2022MegaBlocks: Efficient Sparse Training with Mixture-of-Expertscited by 209
  3. 2025Seedream 3.0 Technical Reportcited by 154
  4. 2021Sequence Parallelism: Long Sequence Training from System Perspectivecited by 126
  5. 2022Any-resolution Training for High-resolution Image Synthesiscited by 72
  6. 2019Optimal checkpointing for heterogeneous chains: how to train deep neural networks with limited memorycited by 22
  7. 2025Padding Tone: A Mechanistic Analysis of Padding Tokens in T2I Modelscited by 13

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026AdaptiveLoad: Towards Efficient Video Diffusion Transformer Training
  2. 2024xDiT: an Inference Engine for Diffusion Transformers (DiTs) with Massive Parallelism
  3. 2026SwiftFusion: Scalable Sequence Parallelism for Distributed Inference of Diffusion Transformers on GPUs
  4. 2026Shiva-DiT: Residual-Based Differentiable Top-k Selection for Efficient Diffusion Transformers
  5. 2026Post-Training Pruning for Diffusion Transformers
  6. 2024Unveiling Redundancy in Diffusion Transformers (DiTs): A Systematic Study
  7. 2024FasterDiT: Towards Faster Diffusion Transformers Training without Architecture Modification
  8. 2024Layer- and Timestep-Adaptive Differentiable Token Compression Ratios for Efficient Diffusion Transformers