File size: 1,023 Bytes
c66f1b8
 
38c3c49
 
 
c66f1b8
38c3c49
5a7a4f5
 
38c3c49
5a7a4f5
38c3c49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
license: openrail++
tags:
- stable-diffusion
inference: false
---

this is merge model for:
1. 100% stable-diffusion-xl-base-1.0 
https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0
2. sdxl-vae-fp16-fix
https://huggingface.co/madebyollin/sdxl-vae-fp16-fix

you can use this directly or finetune.

same license on stable-diffusion-xl-base-1.0

same vae license on sdxl-vae-fp16-fix

# SDXL-VAE-FP16-Fix

SDXL-VAE-FP16-Fix is the [SDXL VAE](https://huggingface.co/stabilityai/sdxl-vae)*, but modified to run in fp16 precision without generating NaNs.

## 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 be close enough for most purposes.

---