Instructions to use openai/consistency-decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use openai/consistency-decoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("openai/consistency-decoder", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
#2
by sayakpaul HF Staff - opened
README.md
CHANGED
|
@@ -17,7 +17,7 @@ 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=torch.float16
|
| 23 |
).to("cuda")
|
|
|
|
| 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=torch.float16
|
| 23 |
).to("cuda")
|