revp2024 commited on
Commit
8a42d77
·
verified ·
1 Parent(s): 63b7a48

Update example usage to avoid undefined `pipe`

Browse files

Update example usage to avoid undefined `pipe`
```
vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=pipe.torch_dtype)
^^^^
NameError: name 'pipe' is not defined
```

Files changed (1) hide show
  1. README.md +2 -2
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=pipe.torch_dtype)
21
  pipe = StableDiffusionPipeline.from_pretrained(
22
- "runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=torch.float16
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