[Paper Review] BK-SDM: A Lightweight, Fast, and Cheap Version of Stable Diffusion
This paper introduces BK-SDM, a lightweight, fast, and cost-effective version of Stable Diffusion that achieves up to 51% reduction in model size and 43% improvement in latency by pruning residual and attention blocks from the U-Net architecture, followed by feature distillation retraining using only 13 A100 days and a small dataset, enabling competitive zero-shot text-to-image generation and efficient deployment on edge devices with under 4-second inference time.
Text-to-image (T2I) generation with Stable Diffusion models (SDMs) involves high computing demands due to billion-scale parameters. To enhance efficiency, recent studies have reduced sampling steps and applied network quantization while retaining the original architectures. The lack of architectural reduction attempts may stem from worries over expensive retraining for such massive models. In this work, we uncover the surprising potential of block pruning and feature distillation for low-cost general-purpose T2I. By removing several residual and attention blocks from the U-Net of SDMs, we achieve 30%~50% reduction in model size, MACs, and latency. We show that distillation retraining is effective even under limited resources: using only 13 A100 days and a tiny dataset, our compact models can imitate the original SDMs (v1.4 and v2.1-base with over 6,000 A100 days). Benefiting from the transferred knowledge, our BK-SDMs deliver competitive results on zero-shot MS-COCO against larger multi-billion parameter models. We further demonstrate the applicability of our lightweight backbones in personalized generation and image-to-image translation. Deployment of our models on edge devices attains 4-second inference. Code and models can be found at: https://github.com/Nota-NetsPresso/BK-SDM
Motivation & Objective
- To reduce the computational and training costs of large-scale text-to-image diffusion models like Stable Diffusion without sacrificing performance.
- To explore architectural compression via block pruning in massive diffusion models, which have been underexplored due to concerns about expensive retraining.
- To demonstrate that knowledge distillation with limited data and compute can effectively transfer knowledge from large pre-trained models to compact, pruned variants.
- To enable efficient deployment of compact diffusion models on edge devices such as Jetson AGX Orin and iPhone 14 with sub-4-second inference.
- To provide a practical, accessible pathway for researchers and developers to train and deploy small yet powerful diffusion models with feasible resource budgets.
Proposed method
- Block pruning is applied to the U-Net architecture of Stable Diffusion, removing multiple residual and attention blocks to reduce model size and MACs.
- Feature-level knowledge distillation is used to retrain the pruned model, transferring knowledge from the original large model to maintain performance.
- The distillation process uses a small dataset of 0.22M LAION pairs and only 13 A100 days of training compute, significantly reducing retraining costs.
- The method is applied to both SDM-v1.4 and SDM-v2.1-base, with consistent performance gains across different model variants.
- The pruned and distilled models are evaluated on zero-shot text-to-image generation, personalized generation, image-to-image translation, and edge deployment.
- The approach is validated on a conditional LDM for face generation (CelebA-HQ), confirming its generalizability beyond text-to-image tasks.
Experimental results
Research questions
- RQ1Can architectural pruning of residual and attention blocks in the U-Net of Stable Diffusion significantly reduce model size and inference latency without degrading performance?
- RQ2Can knowledge distillation effectively transfer the capabilities of a large pre-trained diffusion model to a compact, pruned variant using minimal data and compute?
- RQ3To what extent can a lightweight diffusion model achieve competitive zero-shot text-to-image generation performance compared to multi-billion parameter models?
- RQ4Can the pruned and distilled models be effectively used for personalized text-to-image generation and image-to-image translation with reduced fine-tuning costs?
- RQ5Is it feasible to deploy such compact models on edge devices with real-time inference speeds?
Key findings
- BK-SDM achieves up to 51% reduction in model size and 43% improvement in latency on CPU and GPU, with 30–50% reduction in MACs and inference time.
- The distilled models achieve FID of 14.61 on MS-COCO 30K using only 13 A100 days and 0.22M LAION pairs, rivaling larger models trained with vastly more resources.
- BK-SDM-Small generates 512×512 images in under 4 seconds on both Jetson AGX Orin and iPhone 14, demonstrating strong edge deployment feasibility.
- Personalized generation with DreamBooth shows BK-SDMs preserve 95–99% of the original SDM’s subject and prompt fidelity while reducing fine-tuning costs.
- The method generalizes to other diffusion models, as shown by successful compression of a conditional LDM for CelebA-HQ with 187M parameters achieving high-quality face generation.
- Even with reduced parameters and training data, BK-SDM models maintain competitive CLIP and IS scores, indicating strong generative quality.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.