Cloned from madebyollin/taesdxl
Browse files- README.md +31 -0
- config.json +39 -0
- diffusion_pytorch_model.bin +3 -0
- diffusion_pytorch_model.safetensors +3 -0
- taesdxl_decoder.safetensors +3 -0
- taesdxl_encoder.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# 🍰 Tiny AutoEncoder for Stable Diffusion (XL)
|
| 6 |
+
|
| 7 |
+
[TAESDXL](https://github.com/madebyollin/taesd) is very tiny autoencoder which uses the same "latent API" as [SDXL-VAE](https://huggingface.co/stabilityai/sdxl-vae).
|
| 8 |
+
TAESDXL is useful for [real-time previewing](https://twitter.com/madebyollin/status/1679356448655163394) of the SDXL generation process.
|
| 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 cheesecake topped with berries, mint, chocolate crumble"
|
| 27 |
+
image = pipe(prompt, num_inference_steps=50, generator=torch.Generator("cpu").manual_seed(0x7A35D)).images[0]
|
| 28 |
+
image.save("cheesecake_sdxl.png")
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+

|
config.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderTiny",
|
| 3 |
+
"_diffusers_version": "0.30.0",
|
| 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 |
+
"shift_factor": 0.0,
|
| 37 |
+
"upsample_fn": "nearest",
|
| 38 |
+
"upsampling_scaling_factor": 2
|
| 39 |
+
}
|
diffusion_pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1625815ec7e8c3b63a9fa045fe00be825ed7cdf1691a04f24130a69ac057a70e
|
| 3 |
+
size 9823878
|
diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff4824aca94dd6111e0340fa749347fb74101060d9712cb5ef1ca8f1cf17502f
|
| 3 |
+
size 9793292
|
taesdxl_decoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6013131e7eb412ef20113f1acc2ea7d3e47e53196ca0530fa65d9b61d814b61
|
| 3 |
+
size 4895612
|
taesdxl_encoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f37c0b28f72ec4ca835dc7dbf05255bdf323cde8cf12a304674f106466c98ef
|
| 3 |
+
size 4895600
|