| | --- |
| | 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=torch.float16) |
| | 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 | |
| | :---:|:---:|:---:| |
| |  |  |  | |
| |  |  |  | |
| |  |  |  | |
| |
|