Skip to content

Commit cf33acb

Browse files
committed
add doc
1 parent 5d4cbbc commit cf33acb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/diffusers/models/consistency_decoder_vae.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ class ConsistencyDecoderVaeOutput(BaseOutput):
5050

5151

5252
class ConsistencyDecoderVae(ModelMixin, ConfigMixin):
53+
r"""
54+
The consistency decoder used with DALL-E 3.
55+
56+
Examples:
57+
```py
58+
>>> import torch
59+
>>> from diffusers import DiffusionPipeline, ConsistencyDecoderVae
60+
61+
>>> vae = ConsistencyDecoderVae.from_pretrained("openai/consistency-decoder", torch_dtype=pipe.torch_dtype)
62+
>>> pipe = StableDiffusionPipeline.from_pretrained(
63+
... "runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=torch.float16
64+
... ).to("cuda")
65+
66+
>>> pipe("horse", generator=torch.manual_seed(0)).images
67+
```
68+
"""
69+
5370
@register_to_config
5471
def __init__(self, encoder_args, decoder_args, scaling_factor, block_out_channels, latent_channels):
5572
super().__init__()

0 commit comments

Comments
 (0)