Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

BK-SDM: A Lightweight, Fast, and Cheap Version of Stable Diffusion

About

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

Bo-Kyeong Kim, Hyoung-Kyu Song, Thibault Castells, Shinkook Choi• 2023

Related benchmarks

TaskDatasetResultRank
Image GenerationLSUN church
FID21.1
117
Class-conditioned image generationImageNet-1k 1.0 (test val)
FID50.9
100
Image GenerationCelebA
FID10.37
65
Text-to-Image GenerationMS-COCO (30K)
FID (30K)15.76
62
Text-to-Image GenerationHPS v2
HPSv2.1 Score27.38
45
Text-to-Image GenerationMS-COCO 30k (val)
FID17.23
42
Text-to-Image GenerationMS-COCO 5K 2017 (val)
FID29.26
34
Text-to-Image GenerationPartiPrompts
CLIP Score28.88
26
Text-to-Image GenerationCOCO 2017 (val)--
23
Image GenerationBedroom
FID18.39
22
Showing 10 of 19 rows

Other info

Follow for update