add diffusers compatible variants
#1
by
sayakpaul
HF Staff
- opened
- README.md +18 -1
- config.json +37 -0
- diffusion_pytorch_model.bin +3 -0
- diffusion_pytorch_model.safetensors +3 -0
README.md
CHANGED
|
@@ -9,4 +9,21 @@ TAESDXL is useful for [real-time previewing](https://twitter.com/madebyollin/sta
|
|
| 9 |
|
| 10 |
This repo contains `.safetensors` versions of the TAESDXL weights.
|
| 11 |
|
| 12 |
-
For SD1.x / SD2.x, use [TAESD](https://huggingface.co/madebyollin/taesd/) instead (the SD and SDXL VAEs are [incompatible](https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/discussions/6#64b8a9c13707b7d603c6ac16)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
This repo contains `.safetensors` versions of the TAESDXL weights.
|
| 11 |
|
| 12 |
+
For SD1.x / SD2.x, use [TAESD](https://huggingface.co/madebyollin/taesd/) instead (the SD and SDXL VAEs are [incompatible](https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/discussions/6#64b8a9c13707b7d603c6ac16)).
|
| 13 |
+
|
| 14 |
+
## Using in 🧨 diffusers
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
import torch
|
| 18 |
+
from diffusers import DiffusionPipeline, AutoencoderTiny
|
| 19 |
+
|
| 20 |
+
pipe = DiffusionPipeline.from_pretrained(
|
| 21 |
+
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
|
| 22 |
+
)
|
| 23 |
+
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesdxl", torch_dtype=torch.float16)
|
| 24 |
+
pipe = pipe.to("cuda")
|
| 25 |
+
|
| 26 |
+
prompt = "slice of delicious New York-style berry cheesecake"
|
| 27 |
+
image = pipe(prompt, num_inference_steps=25).images[0]
|
| 28 |
+
image.save("cheesecake_sdxl.png")
|
| 29 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderTiny",
|
| 3 |
+
"_diffusers_version": "0.20.0.dev0",
|
| 4 |
+
"act_fn": "relu",
|
| 5 |
+
"decoder_block_out_channels": [
|
| 6 |
+
64,
|
| 7 |
+
64,
|
| 8 |
+
64,
|
| 9 |
+
64
|
| 10 |
+
],
|
| 11 |
+
"encoder_block_out_channels": [
|
| 12 |
+
64,
|
| 13 |
+
64,
|
| 14 |
+
64,
|
| 15 |
+
64
|
| 16 |
+
],
|
| 17 |
+
"force_upcast": false,
|
| 18 |
+
"in_channels": 3,
|
| 19 |
+
"latent_channels": 4,
|
| 20 |
+
"latent_magnitude": 3,
|
| 21 |
+
"latent_shift": 0.5,
|
| 22 |
+
"num_decoder_blocks": [
|
| 23 |
+
3,
|
| 24 |
+
3,
|
| 25 |
+
3,
|
| 26 |
+
1
|
| 27 |
+
],
|
| 28 |
+
"num_encoder_blocks": [
|
| 29 |
+
1,
|
| 30 |
+
3,
|
| 31 |
+
3,
|
| 32 |
+
3
|
| 33 |
+
],
|
| 34 |
+
"out_channels": 3,
|
| 35 |
+
"scaling_factor": 1.0,
|
| 36 |
+
"upsampling_scaling_factor": 2
|
| 37 |
+
}
|
diffusion_pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0af7e9e60c66873ac787d11f2955a1e1b5a6b7343954d92e74507b71f84f312c
|
| 3 |
+
size 9832437
|
diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55ef8e24c0ef92d7f1d81b2cf66283d72396c6c05b6f073bec845147cd1247f3
|
| 3 |
+
size 9793292
|