File size: 4,036 Bytes
081e986
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
86
87
88
---
base_model: CompVis/stable-diffusion-v-1-4-original
license: creativeml-openrail-m
library_name: "stable-diffusion"
inference: false
model_creator: runwayml
model_name: stable-diffusion-v-1-4-original
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-v-1-4-GGUF

## Original Model

[CompVis/stable-diffusion-v-1-4-original](https://huggingface.co/CompVis/stable-diffusion-v-1-4-original)

## 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 |
| ---- | ---- | ---- | ---- | ----- |
| [stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf](https://huggingface.co/second-state/stable-diffusion-v1-5-GGUF/blob/main/stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf) | Q4_0 | 2 | 1.57 GB | |
| [stable-diffusion-v1-5-pruned-emaonly-Q4_1.gguf](https://huggingface.co/second-state/stable-diffusion-v1-5-GGUF/blob/main/stable-diffusion-v1-5-pruned-emaonly-Q4_1.gguf) | Q4_1 | 3 | 1.59 GB | |
| [stable-diffusion-v1-5-pruned-emaonly-Q5_0.gguf](https://huggingface.co/second-state/stable-diffusion-v1-5-GGUF/blob/main/stable-diffusion-v1-5-pruned-emaonly-Q5_0.gguf) | Q5_0 | 3 | 1.62 GB | |
| [stable-diffusion-v1-5-pruned-emaonly-Q5_1.gguf](https://huggingface.co/second-state/stable-diffusion-v1-5-GGUF/blob/main/stable-diffusion-v1-5-pruned-emaonly-Q5_1.gguf) | Q5_1 | 3 | 1.64 GB | |
| [stable-diffusion-v1-5-pruned-emaonly-Q8_0.gguf](https://huggingface.co/second-state/stable-diffusion-v1-5-GGUF/blob/main/stable-diffusion-v1-5-pruned-emaonly-Q8_0.gguf) | Q8_0 | 4 | 1.76 GB | |
| [stable-diffusion-v1-5-pruned-emaonly-f16.gguf](https://huggingface.co/second-state/stable-diffusion-v1-5-GGUF/blob/main/stable-diffusion-v1-5-pruned-emaonly-f16.gguf)   | f16  | 4 | 2.13 GB | |
| [stable-diffusion-v1-5-pruned-emaonly-f32.gguf](https://huggingface.co/second-state/stable-diffusion-v1-5-GGUF/blob/main/stable-diffusion-v1-5-pruned-emaonly-f32.gguf)   | f32  | 4 | 4.27 GB | |