Commit
•
63b7a48
1
Parent(s):
420c385
Add model card (#1)
Browse files- Update README.md (544ca04c89f842c175af47416cc787b98a2ff8ea)
Co-authored-by: Sayak Paul <sayakpaul@users.noreply.huggingface.co>
README.md
CHANGED
@@ -2,4 +2,36 @@
|
|
2 |
library_name: diffusers
|
3 |
tags:
|
4 |
- stable-diffusion
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
library_name: diffusers
|
3 |
tags:
|
4 |
- stable-diffusion
|
5 |
+
license: mit
|
6 |
+
---
|
7 |
+
|
8 |
+
## Consistency Decoder
|
9 |
+
|
10 |
+
This is a decoder that can be used to improve decoding for Stable Diffusion VAEs. To know more, refer to the [DALL-E 3 technical report](https://cdn.openai.com/papers/dall-e-3.pdf).
|
11 |
+
|
12 |
+
To original code repository can be found [here](https://github.com/openai/consistencydecoder).
|
13 |
+
|
14 |
+
## Usage in 🧨 diffusers
|
15 |
+
|
16 |
+
```python
|
17 |
+
import torch
|
18 |
+
from diffusers import DiffusionPipeline, ConsistencyDecoderVAE
|
19 |
+
|
20 |
+
vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=pipe.torch_dtype)
|
21 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
22 |
+
"runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=torch.float16
|
23 |
+
).to("cuda")
|
24 |
+
|
25 |
+
pipe("horse", generator=torch.manual_seed(0)).images
|
26 |
+
```
|
27 |
+
|
28 |
+
## Results
|
29 |
+
|
30 |
+
_(Taken from the original [code repository](https://github.com/openai/consistencydecoder))_
|
31 |
+
|
32 |
+
## Examples
|
33 |
+
Original Image | GAN Decoder | Consistency Decoder |
|
34 |
+
:---:|:---:|:---:|
|
35 |
+
![Original Image](https://github.com/openai/consistencydecoder/blob/main/assets/gt1.png?raw=true) | ![GAN Image](https://github.com/openai/consistencydecoder/blob/main/assets/gan1.png?raw=true) | ![VAE Image](https://github.com/openai/consistencydecoder/blob/main/assets/con1.png?raw=true) |
|
36 |
+
![Original Image](https://github.com/openai/consistencydecoder/blob/main/assets/gt2.png?raw=true) | ![GAN Image](https://github.com/openai/consistencydecoder/blob/main/assets/gan2.png?raw=true) | ![VAE Image](https://github.com/openai/consistencydecoder/blob/main/assets/con2.png?raw=true) |
|
37 |
+
![Original Image](https://github.com/openai/consistencydecoder/blob/main/assets/gt3.png?raw=true) | ![GAN Image](https://github.com/openai/consistencydecoder/blob/main/assets/gan3.png?raw=true) | ![VAE Image](https://github.com/openai/consistencydecoder/blob/main/assets/con3.png?raw=true) |
|