AsyncDiff: 비동기적 노이즈 제거를 통한 확산 모델 병렬화
AsyncDiff: Parallelizing Diffusion Models by Asynchronous Denoising
June 11, 2024
저자: Zigeng Chen, Xinyin Ma, Gongfan Fang, Zhenxiong Tan, Xinchao Wang
cs.AI
초록
디퓨전 모델은 다양한 응용 분야에서 뛰어난 생성 능력으로 인해 커뮤니티로부터 큰 관심을 받고 있습니다. 그러나 일반적인 다단계 순차적 노이즈 제거 특성으로 인해 누적 지연 시간이 높아져 병렬 계산의 가능성이 제한됩니다. 이를 해결하기 위해, 우리는 AsyncDiff를 소개합니다. 이는 여러 장치 간 모델 병렬화를 가능하게 하는 범용적이고 플러그 앤 플레이 방식의 가속 기법입니다. 우리의 접근 방식은 복잡한 노이즈 예측 모델을 여러 구성 요소로 나누고, 각각을 다른 장치에 할당합니다. 이러한 구성 요소 간의 의존성 체인을 끊기 위해, 연속적인 디퓨전 단계 간의 은닉 상태(hidden state)의 높은 유사성을 활용하여 기존의 순차적 노이즈 제거를 비동기적 프로세스로 변환합니다. 결과적으로, 각 구성 요소는 별도의 장치에서 병렬로 계산할 수 있게 됩니다. 제안된 전략은 생성 품질에 미미한 영향을 미치면서도 추론 지연 시간을 크게 줄입니다. 구체적으로, Stable Diffusion v2.1의 경우, AsyncDiff는 4개의 NVIDIA A5000 GPU에서 2.7배의 속도 향상을 달성하면서도 성능 저하가 거의 없었고, CLIP Score에서 단 0.38의 미미한 감소로 4.0배의 속도 향상을 보였습니다. 우리의 실험은 또한 AsyncDiff가 비디오 디퓨전 모델에 쉽게 적용될 수 있으며, 고무적인 성능을 보인다는 것을 입증했습니다. 코드는 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.Summary
AI-Generated Summary