Campionamento Regionale Adattivo per Trasformatori Diffusivi
Region-Adaptive Sampling for Diffusion Transformers
February 14, 2025
Autori: Ziming Liu, Yifan Yang, Chengruidong Zhang, Yiqi Zhang, Lili Qiu, Yang You, Yuqing Yang
cs.AI
Abstract
I modelli di diffusione (DMs) sono diventati la scelta principale per compiti generativi in diversi domini. Tuttavia, la loro dipendenza da molteplici passaggi in avanti sequenziali limita significativamente le prestazioni in tempo reale. I metodi di accelerazione precedenti si sono concentrati principalmente sulla riduzione del numero di passaggi di campionamento o sul riutilizzo di risultati intermedi, non riuscendo a sfruttare le variazioni tra le regioni spaziali all'interno dell'immagine a causa dei vincoli delle strutture convoluzionali U-Net. Sfruttando la flessibilità dei Diffusion Transformers (DiTs) nel gestire un numero variabile di token, introduciamo RAS, una nuova strategia di campionamento senza addestramento che assegna dinamicamente rapporti di campionamento diversi alle regioni di un'immagine in base al focus del modello DiT. La nostra osservazione chiave è che durante ogni passaggio di campionamento, il modello si concentra su regioni semanticamente significative, e queste aree di interesse mostrano una forte continuità tra passaggi consecutivi. Sfruttando questa intuizione, RAS aggiorna solo le regioni attualmente in focus, mentre le altre regioni vengono aggiornate utilizzando il rumore memorizzato nel passaggio precedente. Il focus del modello è determinato in base all'output del passaggio precedente, capitalizzando la coerenza temporale osservata. Valutiamo RAS su Stable Diffusion 3 e Lumina-Next-T2I, ottenendo accelerazioni rispettivamente fino a 2,36x e 2,51x, con un degrado minimo nella qualità della generazione. Inoltre, uno studio utente rivela che RAS offre qualità comparabili sotto valutazione umana, raggiungendo un'accelerazione di 1,6x. Il nostro approccio rappresenta un passo significativo verso diffusion transformer più efficienti, migliorando il loro potenziale per applicazioni in tempo reale.
English
Diffusion models (DMs) have become the leading choice for generative tasks
across diverse domains. However, their reliance on multiple sequential forward
passes significantly limits real-time performance. Previous acceleration
methods have primarily focused on reducing the number of sampling steps or
reusing intermediate results, failing to leverage variations across spatial
regions within the image due to the constraints of convolutional U-Net
structures. By harnessing the flexibility of Diffusion Transformers (DiTs) in
handling variable number of tokens, we introduce RAS, a novel, training-free
sampling strategy that dynamically assigns different sampling ratios to regions
within an image based on the focus of the DiT model. Our key observation is
that during each sampling step, the model concentrates on semantically
meaningful regions, and these areas of focus exhibit strong continuity across
consecutive steps. Leveraging this insight, RAS updates only the regions
currently in focus, while other regions are updated using cached noise from the
previous step. The model's focus is determined based on the output from the
preceding step, capitalizing on the temporal consistency we observed. We
evaluate RAS on Stable Diffusion 3 and Lumina-Next-T2I, achieving speedups up
to 2.36x and 2.51x, respectively, with minimal degradation in generation
quality. Additionally, a user study reveals that RAS delivers comparable
qualities under human evaluation while achieving a 1.6x speedup. Our approach
makes a significant step towards more efficient diffusion transformers,
enhancing their potential for real-time applications.Summary
AI-Generated Summary