patrickvonplaten
commited on
Commit
•
e9769b0
1
Parent(s):
8e464fc
fix
Browse files
README.md
CHANGED
@@ -19,9 +19,10 @@ SDXL-VAE-FP16-Fix is the [SDXL VAE](https://huggingface.co/stabilityai/sdxl-vae)
|
|
19 |
Just load this checkpoint via `AutoencoderKL`:
|
20 |
|
21 |
```py
|
|
|
22 |
from diffusers import DiffusionPipeline, AutoencoderKL
|
23 |
|
24 |
-
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16
|
25 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-0.9", vae=vae, torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
26 |
pipe.to("cuda")
|
27 |
|
@@ -39,4 +40,4 @@ SDXL-VAE-FP16-Fix was created by finetuning the SDXL-VAE to:
|
|
39 |
2. make the internal activation values smaller, by
|
40 |
3. scaling down weights and biases within the network
|
41 |
|
42 |
-
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.
|
|
|
19 |
Just load this checkpoint via `AutoencoderKL`:
|
20 |
|
21 |
```py
|
22 |
+
import torch
|
23 |
from diffusers import DiffusionPipeline, AutoencoderKL
|
24 |
|
25 |
+
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
26 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-0.9", vae=vae, torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
27 |
pipe.to("cuda")
|
28 |
|
|
|
40 |
2. make the internal activation values smaller, by
|
41 |
3. scaling down weights and biases within the network
|
42 |
|
43 |
+
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.
|