Instructions to use stabilityai/sdxl-vae with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/sdxl-vae with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-vae", 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
get nan when inference with fp16
#6
by BoyuanJiang - opened
get nan when inference with fp16
if your device supports it, bf16 should just work.
if not, you could try using this version https://huggingface.co/madebyollin/sdxl-vae-fp16-fix, which I attempted to make fp16-compatible
EDIT:sdxl-vae-fp16-fix was built on top of the SDXL-VAE (0.9) checkpoint. SDXL-VAE (1.0) changed the decoder slightly:
I think the SDXL-VAE (0.9) decoder is substantially more stylish, so:
sdxl-vae-fp16-fixwill continue to be compatible with both SDXL 0.9 and SDXL 1.0, butsdxl-vae-fp16-fixoutputs will continue to match SDXL-VAE (0.9), not SDXL-VAE (1.0)
This comment has been hidden
This comment has been hidden
@madebyollin Seems like they rolled back to the old version because of that color bleeding which is visible on the 1.0 version. So your version is still up-to-date. Thx for clarification.

