Commit
·
2e0cddd
1
Parent(s):
9ff5484
add performance comparison
Browse files
README.md
CHANGED
@@ -38,11 +38,27 @@ Block-removed Knowledge-distilled Stable Diffusion Model (BK-SDM) is an architec
|
|
38 |
|
39 |
This Model Card contains palettized Core ML weights for iOS 17 or macOS 14, for the following models: BK-SDM base, BK-SDM small and BK-SDM tiny. These models were generated using [Apple’s repository](https://github.com/apple/ml-stable-diffusion) which has [ASCL](https://github.com/apple/ml-stable-diffusion/blob/main/LICENSE.md).
|
40 |
|
|
|
41 |
|
42 |
- **Resources for more information**: [Paper](https://arxiv.org/abs/2305.15798), [GitHub](https://github.com/Nota-NetsPresso/BK-SDM), [Demo]( https://huggingface.co/spaces/nota-ai/compressed-stable-diffusion).
|
43 |
|
44 |
These BK-SDM Core ML models are based on the following pipelines: BK-SDM-{[**Base-2M**](https://huggingface.co/nota-ai/bk-sdm-base-2m), [**Small-2M**](https://huggingface.co/nota-ai/bk-sdm-small-2m), [**Tiny-2M**](https://huggingface.co/nota-ai/bk-sdm-tiny-2m)}.
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
## Compression Method
|
47 |
|
48 |
### U-Net Architecture
|
|
|
38 |
|
39 |
This Model Card contains palettized Core ML weights for iOS 17 or macOS 14, for the following models: BK-SDM base, BK-SDM small and BK-SDM tiny. These models were generated using [Apple’s repository](https://github.com/apple/ml-stable-diffusion) which has [ASCL](https://github.com/apple/ml-stable-diffusion/blob/main/LICENSE.md).
|
40 |
|
41 |
+
A demo to use coreml Stable Diffusion weights can be found [here](https://github.com/huggingface/swift-coreml-diffusers).
|
42 |
|
43 |
- **Resources for more information**: [Paper](https://arxiv.org/abs/2305.15798), [GitHub](https://github.com/Nota-NetsPresso/BK-SDM), [Demo]( https://huggingface.co/spaces/nota-ai/compressed-stable-diffusion).
|
44 |
|
45 |
These BK-SDM Core ML models are based on the following pipelines: BK-SDM-{[**Base-2M**](https://huggingface.co/nota-ai/bk-sdm-base-2m), [**Small-2M**](https://huggingface.co/nota-ai/bk-sdm-small-2m), [**Tiny-2M**](https://huggingface.co/nota-ai/bk-sdm-tiny-2m)}.
|
46 |
|
47 |
+
## Performance comparison
|
48 |
+
|
49 |
+
We have compared BK-SDM to [Apple's Stable Diffusion v1.4 palettized](https://huggingface.co/apple/coreml-stable-diffusion-1-4-palettized), and to [OFA-Sys' small Stable Diffusion v0](https://huggingface.co/pcuenq/coreml-small-stable-diffusion-v0).
|
50 |
+
|
51 |
+
| Base Model Name | Pipeline Size | Quantization Type | Attention Implementation |
|
52 |
+
|----------------------|---------------|-----------------------------------------------------------------------------------|--------------------------|
|
53 |
+
| bk-sdm-base | 1.48GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
54 |
+
| bk-sdm-small | 1.44GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
55 |
+
| bk-sdm-tiny | 1.43GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
56 |
+
| small stable diffusion v0 | 3.28GB | None | split_einsum |
|
57 |
+
| Stable Diffusion v1.4 | 1.57GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
58 |
+
|
59 |
+
|
60 |
+
<img src="https://huggingface.co/nota-ai/coreml-bk-sdm/resolve/main/assets/speed_comparison.gif">
|
61 |
+
|
62 |
## Compression Method
|
63 |
|
64 |
### U-Net Architecture
|