File size: 3,740 Bytes
27a8ead |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
---
base_model: stabilityai/stable-diffusion-2-1
license: openrail++
model_creator: stabilityai
model_name: stable-diffusion-2-1
quantized_by: Second State Inc.
tags:
- stable-diffusion
- text-to-image
---
<!-- header start -->
<!-- 200823 -->
<div style="width: auto; margin-left: auto; margin-right: auto">
<img src="https://github.com/LlamaEdge/LlamaEdge/raw/dev/assets/logo.svg" style="width: 100%; min-width: 400px; display: block; margin: auto;">
</div>
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
<!-- header end -->
# stable-diffusion-2-1-GGUF
## Original Model
[stabilityai/stable-diffusion-2-1](https://huggingface.co/stabilityai/stable-diffusion-2-1)
## Run with `sd-api-server`
Go to the [sd-api-server](https://github.com/LlamaEdge/sd-api-server/blob/main/README.md) repository for more information.
<!-- - LlamaEdge version: [v0.12.2](https://github.com/LlamaEdge/LlamaEdge/releases/tag/0.12.2) and above
- Prompt template
- Prompt type: `chatml`
- Prompt string
```text
<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
```
- Context size: `4096`
- Run as LlamaEdge service
```bash
wasmedge --dir .:. --nn-preload default:GGML:AUTO:stablelm-2-12b-chat-Q5_K_M.gguf \
llama-api-server.wasm \
--prompt-template chatml \
--ctx-size 4096 \
--model-name stablelm-2-12b-chat
```
- Run as LlamaEdge command app
```bash
wasmedge --dir .:. \
--nn-preload default:GGML:AUTO:stablelm-2-12b-chat-Q5_K_M.gguf \
llama-chat.wasm \
--prompt-template chatml \
--ctx-size 4096
``` -->
## Quantized GGUF Models
Using formats of different precisions will yield results of varying quality.
| f32 | f16 |q8_0 |q5_0 |q5_1 |q4_0 |q4_1 |
| ---- |---- |---- |---- |---- |---- |---- |
| ![](https://github.com/leejet/stable-diffusion.cpp/blob/master/assets/f32.png?raw=true) |![](https://github.com/leejet/stable-diffusion.cpp/blob/master/assets/f16.png?raw=true) |![](https://github.com/leejet/stable-diffusion.cpp/blob/master/assets/q8_0.png?raw=true) |![](https://github.com/leejet/stable-diffusion.cpp/blob/master/assets/q5_0.png?raw=true) |![](https://github.com/leejet/stable-diffusion.cpp/blob/master/assets/q5_1.png?raw=true) |![](https://github.com/leejet/stable-diffusion.cpp/blob/master/assets/q4_0.png?raw=true) |![](https://github.com/leejet/stable-diffusion.cpp/blob/master/assets/q4_1.png?raw=true) |
| Name | Quant method | Bits | Size | Use case |
| ---- | ---- | ---- | ---- | ----- |
| [v2-1_768-nonema-pruned-Q4_0.gguf](https://huggingface.co/second-state/stable-diffusion-2-1-GGUF/blob/main/v2-1_768-nonema-pruned-Q4_0.gguf) | Q4_0 | 2 | 1.70 GB | |
| [v2-1_768-nonema-pruned-Q4_1.gguf](https://huggingface.co/second-state/stable-diffusion-2-1-GGUF/blob/main/v2-1_768-nonema-pruned-Q4_1.gguf) | Q4_1 | 3 | 1.74 GB | |
| [v2-1_768-nonema-pruned-Q5_0.gguf](https://huggingface.co/second-state/stable-diffusion-2-1-GGUF/blob/main/v2-1_768-nonema-pruned-Q5_0.gguf) | Q5_0 | 3 | 1.78 GB | |
| [v2-1_768-nonema-pruned-Q5_1.gguf](https://huggingface.co/second-state/stable-diffusion-2-1-GGUF/blob/main/v2-1_768-nonema-pruned-Q5_1.gguf) | Q5_1 | 3 | 1.82 GB | |
| [v2-1_768-nonema-pruned-Q8_0.gguf](https://huggingface.co/second-state/stable-diffusion-2-1-GGUF/blob/main/v2-1_768-nonema-pruned-Q8_0.gguf) | Q8_0 | 4 | 2.01 GB | |
| [v2-1_768-nonema-pruned-f16.gguf](https://huggingface.co/second-state/stable-diffusion-2-1-GGUF/blob/main/v2-1_768-nonema-pruned-f16.gguf) | f16 | 4 | 2.61 GB | |
| [v2-1_768-nonema-pruned-f32.gguf](https://huggingface.co/second-state/stable-diffusion-2-1-GGUF/blob/main/v2-1_768-nonema-pruned-f32.gguf) | f32 | 4 | 5.21 GB | |
|