Instructions to use scikit-plots/consistency-decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use scikit-plots/consistency-decoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("scikit-plots/consistency-decoder", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 1,854 Bytes
3ddd840 | 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 | ---
library_name: diffusers
tags:
- stable-diffusion
license: mit
---
## Consistency Decoder
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).
To original code repository can be found [here](https://github.com/openai/consistencydecoder).
## Usage in 🧨 diffusers
```python
import torch
from diffusers import DiffusionPipeline, ConsistencyDecoderVAE
vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=pipe.torch_dtype)
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=torch.float16
).to("cuda")
pipe("horse", generator=torch.manual_seed(0)).images
```
## Results
_(Taken from the original [code repository](https://github.com/openai/consistencydecoder))_
## Examples
Original Image | GAN Decoder | Consistency Decoder |
:---:|:---:|:---:|
 |  |  |
 |  |  |
 |  |  |
|