consistency-decoder / README.md
revp2024's picture
Update example usage to avoid undefined `pipe`
8a42d77 verified
|
raw
history blame
1.85 kB
metadata
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.

To original code repository can be found here.

Usage in 🧨 diffusers

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=vae.dtype
).to("cuda")

pipe("horse", generator=torch.manual_seed(0)).images

Results

(Taken from the original code repository)

Examples

Original Image GAN Decoder Consistency Decoder
Original Image GAN Image VAE Image
Original Image GAN Image VAE Image
Original Image GAN Image VAE Image