Rethinking Token-wise Feature Caching: Accelerating Diffusion Transformers with Dual Feature Caching

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zou, Chang, Zhang, Evelyn, Guo, Runlin, Xu, Haohang, He, Conghui, Hu, Xuming, Zhang, Linfeng
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866918207438192640
author Zou, Chang
Zhang, Evelyn
Guo, Runlin
Xu, Haohang
He, Conghui
Hu, Xuming
Zhang, Linfeng
author_facet Zou, Chang
Zhang, Evelyn
Guo, Runlin
Xu, Haohang
He, Conghui
Hu, Xuming
Zhang, Linfeng
contents Diffusion Transformers (DiT) have become the dominant methods in image and video generation yet still suffer substantial computational costs. As an effective approach for DiT acceleration, feature caching methods are designed to cache the features of DiT in previous timesteps and reuse them in the next timesteps, allowing us to skip the computation in the next timesteps. Among them, token-wise feature caching has been introduced to perform different caching ratios for different tokens in DiTs, aiming to skip the computation for unimportant tokens while still computing the important ones. In this paper, we propose to carefully check the effectiveness in token-wise feature caching with the following two questions: (1) Is it really necessary to compute the so-called "important" tokens in each step? (2) Are so-called important tokens really important? Surprisingly, this paper gives some counter-intuition answers, demonstrating that consistently computing the selected ``important tokens'' in all steps is not necessary. The selection of the so-called ``important tokens'' is often ineffective, and even sometimes shows inferior performance than random selection. Based on these observations, this paper introduces dual feature caching referred to as DuCa, which performs aggressive caching strategy and conservative caching strategy iteratively and selects the tokens for computing randomly. Extensive experimental results demonstrate the effectiveness of our method in DiT, PixArt, FLUX, and OpenSora, demonstrating significant improvements than the previous token-wise feature caching.
format Preprint
id arxiv_https___arxiv_org_abs_2412_18911
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Rethinking Token-wise Feature Caching: Accelerating Diffusion Transformers with Dual Feature Caching
Zou, Chang
Zhang, Evelyn
Guo, Runlin
Xu, Haohang
He, Conghui
Hu, Xuming
Zhang, Linfeng
Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
Diffusion Transformers (DiT) have become the dominant methods in image and video generation yet still suffer substantial computational costs. As an effective approach for DiT acceleration, feature caching methods are designed to cache the features of DiT in previous timesteps and reuse them in the next timesteps, allowing us to skip the computation in the next timesteps. Among them, token-wise feature caching has been introduced to perform different caching ratios for different tokens in DiTs, aiming to skip the computation for unimportant tokens while still computing the important ones. In this paper, we propose to carefully check the effectiveness in token-wise feature caching with the following two questions: (1) Is it really necessary to compute the so-called "important" tokens in each step? (2) Are so-called important tokens really important? Surprisingly, this paper gives some counter-intuition answers, demonstrating that consistently computing the selected ``important tokens'' in all steps is not necessary. The selection of the so-called ``important tokens'' is often ineffective, and even sometimes shows inferior performance than random selection. Based on these observations, this paper introduces dual feature caching referred to as DuCa, which performs aggressive caching strategy and conservative caching strategy iteratively and selects the tokens for computing randomly. Extensive experimental results demonstrate the effectiveness of our method in DiT, PixArt, FLUX, and OpenSora, demonstrating significant improvements than the previous token-wise feature caching.
title Rethinking Token-wise Feature Caching: Accelerating Diffusion Transformers with Dual Feature Caching
topic Machine Learning
Artificial Intelligence
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2412.18911