Commit ·
7ac93fc
1
Parent(s): c16d8a1
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,8 +4,7 @@ tags:
|
|
| 4 |
- stable-diffusion
|
| 5 |
- stable-diffusion-diffusers
|
| 6 |
- text-to-image
|
| 7 |
-
|
| 8 |
-
- ChristophSchuhmann/improved_aesthetics_6.5plus
|
| 9 |
pipeline_tag: text-to-image
|
| 10 |
extra_gated_prompt: >-
|
| 11 |
This model is open access and available to all, with a CreativeML OpenRAIL-M
|
|
@@ -33,30 +32,27 @@ extra_gated_heading: Please read the LICENSE to access this model
|
|
| 33 |
|
| 34 |
---
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 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 |
-
## Performance comparison
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
| Base Model Name | Pipeline Size | Quantization Type | Attention Implementation |
|
| 50 |
|----------------------|---------------|-----------------------------------------------------------------------------------|--------------------------|
|
| 51 |
-
| BK-SDM-Base-2M | 1.48GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
| 52 |
-
| BK-SDM-Small-2M | 1.44GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
| 53 |
-
| BK-SDM-Tiny-2M | 1.43GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
| 54 |
-
| Small Stable Diffusion v0 | 3.28GB | None | split_einsum |
|
| 55 |
-
| Stable Diffusion v1.4 | 1.57GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
| 56 |
-
|
| 57 |
|
| 58 |
<img src="https://huggingface.co/nota-ai/coreml-bk-sdm/resolve/main/assets/speed_comparison.gif">
|
| 59 |
|
|
|
|
| 60 |
## Compression Method
|
| 61 |
|
| 62 |
### U-Net Architecture
|
|
|
|
| 4 |
- stable-diffusion
|
| 5 |
- stable-diffusion-diffusers
|
| 6 |
- text-to-image
|
| 7 |
+
- core-ml
|
|
|
|
| 8 |
pipeline_tag: text-to-image
|
| 9 |
extra_gated_prompt: >-
|
| 10 |
This model is open access and available to all, with a CreativeML OpenRAIL-M
|
|
|
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
+
# Palettized Core ML Weights for BK-SDMs
|
| 36 |
+
For deployment on iOS 17 or macOS 14, this model card introduces palettized Core ML weights of BK-SDM-{[**Base-2M**](https://huggingface.co/nota-ai/bk-sdm-base-2m), [**Small-2M**](https://huggingface.co/nota-ai/bk-sdm-small-2m) and [**Tiny-2M**](https://huggingface.co/nota-ai/bk-sdm-tiny-2m)}. These weights 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).
|
| 37 |
+
- Block-removed Knowledge-distilled Stable Diffusion Model (BK-SDM) is an architecturally compressed SDM for efficient text-to-image synthesis. This model is bulit with (i) removing several residual and attention blocks from the U-Net of [Stable Diffusion v1.4]( https://huggingface.co/CompVis/stable-diffusion-v1-4) and (ii) distillation pretraining. Despite being trained with very limited resources, our compact model can imitate the original SDM by benefiting from transferred knowledge.
|
| 38 |
+
- More information about BK-SDMs: [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).
|
| 39 |
|
| 40 |
A demo to use coreml Stable Diffusion weights can be found [here](https://github.com/huggingface/swift-coreml-diffusers).
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
## Deployment Results
|
| 44 |
|
| 45 |
| Base Model Name | Pipeline Size | Quantization Type | Attention Implementation |
|
| 46 |
|----------------------|---------------|-----------------------------------------------------------------------------------|--------------------------|
|
| 47 |
+
| [BK-SDM-Base-2M](https://huggingface.co/nota-ai/bk-sdm-base-2m) (Ours) | 1.48GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
| 48 |
+
| [BK-SDM-Small-2M](https://huggingface.co/nota-ai/bk-sdm-small-2m) (Ours) | 1.44GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
| 49 |
+
| [BK-SDM-Tiny-2M](https://huggingface.co/nota-ai/bk-sdm-tiny-2m) (Ours) | 1.43GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
| 50 |
+
| [OFA-Sys' Small Stable Diffusion v0](https://huggingface.co/pcuenq/coreml-small-stable-diffusion-v0) | 3.28GB | None | split_einsum |
|
| 51 |
+
| [Apple's Stable Diffusion v1.4, Palettized](https://huggingface.co/apple/coreml-stable-diffusion-1-4-palettized) | 1.57GB | [Palettized](https://coremltools.readme.io/docs/palettization-overview) | split_einsum_v2 |
|
|
|
|
| 52 |
|
| 53 |
<img src="https://huggingface.co/nota-ai/coreml-bk-sdm/resolve/main/assets/speed_comparison.gif">
|
| 54 |
|
| 55 |
+
|
| 56 |
## Compression Method
|
| 57 |
|
| 58 |
### U-Net Architecture
|