SJD: Accelerating Auto-regressive Text-to-Image Generation with Training-free Speculative Jacobi Decoding

April 21, 2025 ยท View on GitHub

Yao Teng1, Han Shi2, Xian Liu3, Xuefei Ning4, Guohao Dai5,6, Yu Wang4, Zhenguo Li2, and Xihui Liu1.

1The University of Hong Kong, 2Huawei Noahโ€™s Ark Lab, 3CUHK, 4Tsinghua University, 5Shanghai Jiao Tong University, 6Infinigence AI

๐Ÿšฉ New Features/Updates

  • โœ… Apr, 2025. ๐Ÿ’ฅ SJD has been integrated into Lumina-mGPT2 and SimpleAR.
  • โœ… Jan, 2025. ๐Ÿ’ฅ SJD is accepted to ICLR 2025.
  • โœ… Oct, 2024. Release SJD's code.

๐Ÿšฉ TODO List

  • โ–ก Integrating SJD into vLLM framework for further acceleration.

Installing the dependencies

Environment:
  • Python 3.10
  • CUDA 12.5
  • Pytorch 2.5.1+cu124
  • Transformers 4.47.1
Install from yaml:
conda env create -f environment.yaml

Performance

Text-to-Image with SJD

Lumina-mGPT

CUDA_VISIBLE_DEVICES=0 python test_lumina_mgpt.py

Emu3

CUDA_VISIBLE_DEVICES=0 python test_emu3.py

LlamaGen

CUDA_VISIBLE_DEVICES=0 python test_llamagen.py

Acknowledge

Our code is based on Lumina-mGPT, Emu3, LlamaGen, Anole, and CLLM. We would like to express our gratitude to Tianwei Xiong for his assistance.

Citation

@article{teng2024accelerating,
  title={Accelerating auto-regressive text-to-image generation with training-free speculative jacobi decoding},
  author={Teng, Yao and Shi, Han and Liu, Xian and Ning, Xuefei and Dai, Guohao and Wang, Yu and Li, Zhenguo and Liu, Xihui},
  journal={arXiv preprint arXiv:2410.01699},
  year={2024}
}