Update example usage to avoid undefined `pipe`
Browse filesUpdate example usage to avoid undefined `pipe`
```
vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=pipe.torch_dtype)
^^^^
NameError: name 'pipe' is not defined
```
README.md
CHANGED
@@ -17,9 +17,9 @@ To original code repository can be found [here](https://github.com/openai/consis
|
|
17 |
import torch
|
18 |
from diffusers import DiffusionPipeline, ConsistencyDecoderVAE
|
19 |
|
20 |
-
vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=
|
21 |
pipe = StableDiffusionPipeline.from_pretrained(
|
22 |
-
"runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=
|
23 |
).to("cuda")
|
24 |
|
25 |
pipe("horse", generator=torch.manual_seed(0)).images
|
|
|
17 |
import torch
|
18 |
from diffusers import DiffusionPipeline, ConsistencyDecoderVAE
|
19 |
|
20 |
+
vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=torch.float16)
|
21 |
pipe = StableDiffusionPipeline.from_pretrained(
|
22 |
+
"runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=vae.dtype
|
23 |
).to("cuda")
|
24 |
|
25 |
pipe("horse", generator=torch.manual_seed(0)).images
|