SDXL VAE FP16 Fix SDXL VAE FP16 Fix is the SDXL VAE , but modified to run in fp16 precision without generating NaNs. VAE Decoding in float32 / bfloat16 precision Decoding in float16 precision SDXL VAE ✅ ⚠️ SDXL VAE FP16 Fix ✅ ✅ 🧨 Diffusers Usage Just load this checkpoint via AutoencoderKL : Automatic1111 Usage 1. Download the fixed sdxl.vae.safetensors file 2. Move this sdxl.vae.safetensors file into the webui folder under stable diffusion webui/models/VAE 3. In your webui settings, select the fixed VAE you just added 4. If you were using the no half vae command line arg for SDXL (in webui user.bat or wherever), you can now remove it (Disclaimer I haven't tested this, just aggregating various instructions I've seen elsewhere :P PRs to improve these instructions are welcomed!) Details SDXL VAE generates NaNs in fp16 because the internal activation values are too big: SDXL VAE FP16 Fix was created by finetuning the SDXL VAE to: 1. keep the final output the same, but 2. make the internal activation values smaller, by 3. scaling down weights and biases within the network There are slight discrepancies between the output of SDXL VAE FP16 Fix and SDXL VAE, but the decoded images should…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy