Paper Reading AI Learner

SwiftDiffusion: Efficient Diffusion Model Serving with Add-on Modules

2024-07-02 07:59:08
Suyi Li, Lingyun Yang, Xiaoxiao Jiang, Hanfeng Lu, Zhipeng Di, Weiyi Lu, Jiawei Chen, Kan Liu, Yinghao Yu, Tao Lan, Guodong Yang, Lin Qu, Liping Zhang, Wei Wang

Abstract

This paper documents our characterization study and practices for serving text-to-image requests with stable diffusion models in production. We first comprehensively analyze inference request traces for commercial text-to-image applications. It commences with our observation that add-on modules, i.e., ControlNets and LoRAs, that augment the base stable diffusion models, are ubiquitous in generating images for commercial applications. Despite their efficacy, these add-on modules incur high loading overhead, prolong the serving latency, and swallow up expensive GPU resources. Driven by our characterization study, we present SwiftDiffusion, a system that efficiently generates high-quality images using stable diffusion models and add-on modules. To achieve this, SwiftDiffusion reconstructs the existing text-to-image serving workflow by identifying the opportunities for parallel computation and distributing ControlNet computations across multiple GPUs. Further, SwiftDiffusion thoroughly analyzes the dynamics of image generation and develops techniques to eliminate the overhead associated with LoRA loading and patching while preserving the image quality. Last, SwiftDiffusion proposes specialized optimizations in the backbone architecture of the stable diffusion models, which are also compatible with the efficient serving of add-on modules. Compared to state-of-the-art text-to-image serving systems, SwiftDiffusion reduces serving latency by up to 5x and improves serving throughput by up to 2x without compromising image quality.

Abstract (translated)

本文记录了我们在生产环境中使用稳定扩散模型处理文本到图像请求的分类和实现。我们首先对商业文本到图像应用的推理请求跟踪进行全面分析。我们的观察是,增强基稳定扩散模型的附加模块(即控制网络和LoRAs)无处不在,都在生成图像。尽管它们非常有效,但这些附加模块却带来了高昂的加载开销,延长了服务延迟,并吞噬了昂贵的GPU资源。为了实现我们的分类研究,我们提出了SwiftDiffusion系统,这是一种高效使用稳定扩散模型和附加模块生成高质量图像的系统。为了实现这一目标,SwiftDiffusion通过识别并分配计算机会并行执行控制网络计算,对现有的文本到图像服务流程进行重构。此外,SwiftDiffusion还深入分析了图像生成的动态,并开发了消除LoRA加载和补丁开销,同时保留图像质量的技术。最后,SwiftDiffusion在稳定扩散模型的基础架构上提出了专用的优化措施,这些措施与附加模块的高效服务是兼容的。与最先进的文本到图像服务系统相比,SwiftDiffusion将服务延迟减少到原来的5倍,同时将服务吞吐量提高到原来的2倍,而不会牺牲图像质量。

URL

https://arxiv.org/abs/2407.02031

PDF

https://arxiv.org/pdf/2407.02031.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot