BK-SDM
BK-SDM is a lightweight, fast, and efficient text-to-image synthesis model designed as a compressed version of Stable Diffusion. It achieves significant speed and size reductions by strategically removing specific residual and attention blocks from the U-Net architecture while maintaining high-quality image generation. The framework is compatible with various Stable Diffusion versions including v1.4, v1.5, and v2.1-base. Key features include knowledge distillation pretraining that remains effective even with limited data, offering models in Base, Small, and Tiny variants. These compressed models support efficient inference suitable for edge devices like mobile phones, demonstrated by 4-second image generation on iPhone 14. The software enables users to generate images quickly, perform DreamBooth finetuning for personalized outputs, and evaluate performance on benchmarks like MS-COCO. Pretrained weights are available on Hugging Face for both v1 and v2 foundations, with training conducted on LAION datasets. The