LAPTOP-Diff: Layer Pruning and Normalized Distillation for Compressing Diffusion Models

LAPTOP-Diff: Layer Pruning and Normalized Distillation for Compressing Diffusion Models

19 Apr 2024 | Dingkun Zhang, Sijia Li, Chen Chen, Qingsong Xie, Haonan Lu
The paper "LAPTOP-Diff: Layer Pruning and Normalized Distillation for Compressing Diffusion Models" addresses the challenge of compressing Stable Diffusion models (SDMs) to reduce memory consumption and latency, particularly for on-device applications. The authors propose a method called Layer Pruning and Normalized Distillation (LAPTOP-Diff) to achieve this goal. Key contributions include: 1. **Layer Pruning**: The authors introduce an automated layer pruning method to compress SDM's U-Net, which is more efficient and scalable compared to handcrafted layer removal methods. They propose a one-shot pruning criterion that guarantees good performance through its additivity property, outperforming other pruning methods. 2. **Normalized Feature Distillation**: To address the imbalance issue in feature distillation during retraining, the authors propose a normalized feature distillation approach. This method reweights the feature loss terms based on the L2-Norms of the teacher's feature maps, ensuring that all feature loss terms are treated equally, thus improving the overall performance. 3. **Experimental Results**: The proposed LAPTOP-Diff method is evaluated on SDXL and SDM-v1.5 models. The results show that the method achieves minimal performance degradation (4.0% PickScore decline at a 50% pruning ratio) while significantly reducing the model size and latency. Visual comparisons with state-of-the-art methods demonstrate superior performance in terms of image quality and text-image consistency. 4. **Ablation Studies**: The paper includes ablation studies to validate the effectiveness of the proposed pruning criteria and the normalized feature distillation. These studies show that the output loss criterion consistently satisfies the additivity property and achieves the best pruning performance, while the normalized feature distillation significantly improves the retraining process. Overall, LAPTOP-Diff provides a robust and efficient solution for compressing SDMs, making them more suitable for low-budget and on-device applications.The paper "LAPTOP-Diff: Layer Pruning and Normalized Distillation for Compressing Diffusion Models" addresses the challenge of compressing Stable Diffusion models (SDMs) to reduce memory consumption and latency, particularly for on-device applications. The authors propose a method called Layer Pruning and Normalized Distillation (LAPTOP-Diff) to achieve this goal. Key contributions include: 1. **Layer Pruning**: The authors introduce an automated layer pruning method to compress SDM's U-Net, which is more efficient and scalable compared to handcrafted layer removal methods. They propose a one-shot pruning criterion that guarantees good performance through its additivity property, outperforming other pruning methods. 2. **Normalized Feature Distillation**: To address the imbalance issue in feature distillation during retraining, the authors propose a normalized feature distillation approach. This method reweights the feature loss terms based on the L2-Norms of the teacher's feature maps, ensuring that all feature loss terms are treated equally, thus improving the overall performance. 3. **Experimental Results**: The proposed LAPTOP-Diff method is evaluated on SDXL and SDM-v1.5 models. The results show that the method achieves minimal performance degradation (4.0% PickScore decline at a 50% pruning ratio) while significantly reducing the model size and latency. Visual comparisons with state-of-the-art methods demonstrate superior performance in terms of image quality and text-image consistency. 4. **Ablation Studies**: The paper includes ablation studies to validate the effectiveness of the proposed pruning criteria and the normalized feature distillation. These studies show that the output loss criterion consistently satisfies the additivity property and achieves the best pruning performance, while the normalized feature distillation significantly improves the retraining process. Overall, LAPTOP-Diff provides a robust and efficient solution for compressing SDMs, making them more suitable for low-budget and on-device applications.
Reach us at info@study.space