Qihoo-T2X: Un trasformatore di diffusione focalizzato sull'efficienza tramite token di procura per il testo verso qualsiasi compito.
Qihoo-T2X: An Efficiency-Focused Diffusion Transformer via Proxy Tokens for Text-to-Any-Task
September 6, 2024
Autori: Jing Wang, Ao Ma, Jiasong Feng, Dawei Leng, Yuhui Yin, Xiaodan Liang
cs.AI
Abstract
Il meccanismo di autoattenzione globale nei trasformatori a diffusione comporta una computazione ridondante a causa della natura sparsa e ridondante delle informazioni visive, e la mappa di attenzione dei token all'interno di una finestra spaziale mostra una significativa similarità. Per affrontare questa ridondanza, proponiamo il Proxy Token Diffusion Transformer (PT-DiT), che utilizza un'attenzione sparsa sui token rappresentativi (dove il numero di token rappresentativi è molto più piccolo rispetto al numero totale di token) per modellare efficientemente le informazioni visive globali. Nello specifico, in ogni blocco del trasformatore, campioniamo casualmente un token da ogni finestra spazio-temporale per fungere da token proxy per quella regione. Le semantica globali sono catturate attraverso l'autoattenzione di questi token proxy e poi iniettate in tutti i token latenti tramite l'attenzione incrociata. Allo stesso tempo, introduciamo l'attenzione alla finestra e l'attenzione allo spostamento della finestra per affrontare le limitazioni nella modellazione dettagliata causate dal meccanismo di attenzione sparsa. Basandoci sul ben progettato PT-DiT, sviluppiamo ulteriormente la famiglia Qihoo-T2X, che include una varietà di modelli per compiti T2I, T2V e T2MV. I risultati sperimentali mostrano che PT-DiT raggiunge prestazioni competitive riducendo la complessità computazionale sia nei compiti di generazione di immagini che di video (ad esempio, una riduzione del 48% rispetto a DiT e una riduzione del 35% rispetto a Pixart-alpha). Il nostro codice sorgente è disponibile su https://github.com/360CVGroup/Qihoo-T2X.
English
The global self-attention mechanism in diffusion transformers involves
redundant computation due to the sparse and redundant nature of visual
information, and the attention map of tokens within a spatial window shows
significant similarity. To address this redundancy, we propose the Proxy Token
Diffusion Transformer (PT-DiT), which employs sparse representative token
attention (where the number of representative tokens is much smaller than the
total number of tokens) to model global visual information efficiently.
Specifically, in each transformer block, we randomly sample one token from each
spatial-temporal window to serve as a proxy token for that region. The global
semantics are captured through the self-attention of these proxy tokens and
then injected into all latent tokens via cross-attention. Simultaneously, we
introduce window and shift window attention to address the limitations in
detail modeling caused by the sparse attention mechanism. Building on the
well-designed PT-DiT, we further develop the Qihoo-T2X family, which includes a
variety of models for T2I, T2V, and T2MV tasks. Experimental results show that
PT-DiT achieves competitive performance while reducing the computational
complexity in both image and video generation tasks (e.g., a 48% reduction
compared to DiT and a 35% reduction compared to Pixart-alpha). Our source code
is available at https://github.com/360CVGroup/Qihoo-T2X.Summary
AI-Generated Summary