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
Add Diffusers weights
#3
by patrickvonplaten - opened
No description provided.
Add diffusers weights in pt and safetensors
patrickvonplaten changed pull request status to open
patrickvonplaten changed pull request status to merged
Thanks for adding this! Minor issue - the config.json in this PR still uses the old SD-VAE scaling factor:
"scaling_factor": 0.18215,
However, per https://github.com/Stability-AI/generative-models/blob/main/configs/inference/sd_xl_base.yaml#L4, there is a new SDXL-VAE scaling factor:
"scaling_factor": 0.13025
Tiny PR to fix: https://huggingface.co/stabilityai/sdxl-vae/discussions/4