|
|
--- |
|
|
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 | |
|
|
| ---- |---- |---- |---- |---- |---- |---- | |
|
|
|  | | | | | | | |
|
|
|
|
|
| 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 | | |
|
|
|