ChatPaper.aiChatPaper

AsyncDiff: Parallelisatie van diffusiemodellen door asynchrone denoising

AsyncDiff: Parallelizing Diffusion Models by Asynchronous Denoising

June 11, 2024
Auteurs: Zigeng Chen, Xinyin Ma, Gongfan Fang, Zhenxiong Tan, Xinchao Wang
cs.AI

Samenvatting

Diffusiemodellen hebben aanzienlijke belangstelling van de gemeenschap gewekt vanwege hun uitstekende generatieve vermogen in diverse toepassingen. Hun typische, meerstaps sequentiële denoising-karakter leidt echter tot een hoge cumulatieve latentie, waardoor parallelle berekeningen niet mogelijk zijn. Om dit aan te pakken, introduceren we AsyncDiff, een universeel en plug-and-play versnellingsschema dat modelparallelisme over meerdere apparaten mogelijk maakt. Onze aanpak verdeelt het omvangrijke ruisvoorspellingsmodel in meerdere componenten, waarbij elke component aan een ander apparaat wordt toegewezen. Om de afhankelijkheidsketen tussen deze componenten te doorbreken, transformeert het de conventionele sequentiële denoising in een asynchroon proces door gebruik te maken van de hoge gelijkenis tussen verborgen toestanden in opeenvolgende diffusiestappen. Hierdoor kan elke component parallel worden berekend op afzonderlijke apparaten. De voorgestelde strategie vermindert de inferentielatentie aanzienlijk, terwijl de generatieve kwaliteit minimaal wordt beïnvloed. Specifiek behaalt AsyncDiff voor Stable Diffusion v2.1 een 2,7x versnelling met verwaarloosbare degradatie en een 4,0x versnelling met slechts een lichte reductie van 0,38 in CLIP Score, op vier NVIDIA A5000 GPU's. Onze experimenten tonen ook aan dat AsyncDiff eenvoudig kan worden toegepast op videodiffusiemodellen met bemoedigende prestaties. De code is beschikbaar op https://github.com/czg1225/AsyncDiff.
English
Diffusion models have garnered significant interest from the community for their great generative ability across various applications. However, their typical multi-step sequential-denoising nature gives rise to high cumulative latency, thereby precluding the possibilities of parallel computation. To address this, we introduce AsyncDiff, a universal and plug-and-play acceleration scheme that enables model parallelism across multiple devices. Our approach divides the cumbersome noise prediction model into multiple components, assigning each to a different device. To break the dependency chain between these components, it transforms the conventional sequential denoising into an asynchronous process by exploiting the high similarity between hidden states in consecutive diffusion steps. Consequently, each component is facilitated to compute in parallel on separate devices. The proposed strategy significantly reduces inference latency while minimally impacting the generative quality. Specifically, for the Stable Diffusion v2.1, AsyncDiff achieves a 2.7x speedup with negligible degradation and a 4.0x speedup with only a slight reduction of 0.38 in CLIP Score, on four NVIDIA A5000 GPUs. Our experiments also demonstrate that AsyncDiff can be readily applied to video diffusion models with encouraging performances. The code is available at https://github.com/czg1225/AsyncDiff.
PDF121December 8, 2024