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
Getting fp16 model in diffusers?
#4
by chigozie - opened
If I do:
vae = ConsistencyDecoderVAE.from_pretrained(
"openai/consistency-decoder",
cache_dir='diffusers-cache',
torch_dtype=torch.float16
)
as suggested in the model card, and then I go to look in diffusers-cache/snapshots/63b7a48896d92b6f56772f4111d0860b1bee3dd3, I see diffusion_pytorch_model.safetensors, not diffusion_pytorch_model.fp16.safetensors.
you need variant='fp16'
Thanks!
chigozie changed discussion status to closed