Layer- and Timestep-Adaptive Differentiable Token Compression Ratios for Efficient Diffusion Transformers

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: You, Haoran, Barnes, Connelly, Zhou, Yuqian, Kang, Yan, Du, Zhenbang, Zhou, Wei, Zhang, Lingzhi, Nitzan, Yotam, Liu, Xiaoyang, Lin, Zhe, Shechtman, Eli, Amirghodsi, Sohrab, Lin, Yingyan Celine
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912297212968960
author You, Haoran
Barnes, Connelly
Zhou, Yuqian
Kang, Yan
Du, Zhenbang
Zhou, Wei
Zhang, Lingzhi
Nitzan, Yotam
Liu, Xiaoyang
Lin, Zhe
Shechtman, Eli
Amirghodsi, Sohrab
Lin, Yingyan Celine
author_facet You, Haoran
Barnes, Connelly
Zhou, Yuqian
Kang, Yan
Du, Zhenbang
Zhou, Wei
Zhang, Lingzhi
Nitzan, Yotam
Liu, Xiaoyang
Lin, Zhe
Shechtman, Eli
Amirghodsi, Sohrab
Lin, Yingyan Celine
contents Diffusion Transformers (DiTs) have achieved state-of-the-art (SOTA) image generation quality but suffer from high latency and memory inefficiency, making them difficult to deploy on resource-constrained devices. One major efficiency bottleneck is that existing DiTs apply equal computation across all regions of an image. However, not all image tokens are equally important, and certain localized areas require more computation, such as objects. To address this, we propose DiffCR, a dynamic DiT inference framework with differentiable compression ratios, which automatically learns to dynamically route computation across layers and timesteps for each image token, resulting in efficient DiTs. Specifically, DiffCR integrates three features: (1) A token-level routing scheme where each DiT layer includes a router that is fine-tuned jointly with model weights to predict token importance scores. In this way, unimportant tokens bypass the entire layer's computation; (2) A layer-wise differentiable ratio mechanism where different DiT layers automatically learn varying compression ratios from a zero initialization, resulting in large compression ratios in redundant layers while others remain less compressed or even uncompressed; (3) A timestep-wise differentiable ratio mechanism where each denoising timestep learns its own compression ratio. The resulting pattern shows higher ratios for noisier timesteps and lower ratios as the image becomes clearer. Extensive experiments on text-to-image and inpainting tasks show that DiffCR effectively captures dynamism across token, layer, and timestep axes, achieving superior trade-offs between generation quality and efficiency compared to prior works. The project website is available at https://www.haoranyou.com/diffcr.
format Preprint
id arxiv_https___arxiv_org_abs_2412_16822
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Layer- and Timestep-Adaptive Differentiable Token Compression Ratios for Efficient Diffusion Transformers
You, Haoran
Barnes, Connelly
Zhou, Yuqian
Kang, Yan
Du, Zhenbang
Zhou, Wei
Zhang, Lingzhi
Nitzan, Yotam
Liu, Xiaoyang
Lin, Zhe
Shechtman, Eli
Amirghodsi, Sohrab
Lin, Yingyan Celine
Computer Vision and Pattern Recognition
Artificial Intelligence
Machine Learning
Diffusion Transformers (DiTs) have achieved state-of-the-art (SOTA) image generation quality but suffer from high latency and memory inefficiency, making them difficult to deploy on resource-constrained devices. One major efficiency bottleneck is that existing DiTs apply equal computation across all regions of an image. However, not all image tokens are equally important, and certain localized areas require more computation, such as objects. To address this, we propose DiffCR, a dynamic DiT inference framework with differentiable compression ratios, which automatically learns to dynamically route computation across layers and timesteps for each image token, resulting in efficient DiTs. Specifically, DiffCR integrates three features: (1) A token-level routing scheme where each DiT layer includes a router that is fine-tuned jointly with model weights to predict token importance scores. In this way, unimportant tokens bypass the entire layer's computation; (2) A layer-wise differentiable ratio mechanism where different DiT layers automatically learn varying compression ratios from a zero initialization, resulting in large compression ratios in redundant layers while others remain less compressed or even uncompressed; (3) A timestep-wise differentiable ratio mechanism where each denoising timestep learns its own compression ratio. The resulting pattern shows higher ratios for noisier timesteps and lower ratios as the image becomes clearer. Extensive experiments on text-to-image and inpainting tasks show that DiffCR effectively captures dynamism across token, layer, and timestep axes, achieving superior trade-offs between generation quality and efficiency compared to prior works. The project website is available at https://www.haoranyou.com/diffcr.
title Layer- and Timestep-Adaptive Differentiable Token Compression Ratios for Efficient Diffusion Transformers
topic Computer Vision and Pattern Recognition
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2412.16822