aifeifei798
commited on
Commit
•
319774e
1
Parent(s):
a2aaeb6
Upload 5 files
Browse files- README.md +35 -3
- config.json +45 -0
- diffusion_pytorch_model.bin +3 -0
- diffusion_pytorch_model.safetensors +3 -0
README.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1 |
-
---
|
2 |
-
license:
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
---
|
4 |
+
|
5 |
+
# 🍰 Tiny AutoEncoder for FLUX.1
|
6 |
+
|
7 |
+
[TAEF1](https://github.com/madebyollin/taesd) is very tiny autoencoder which uses the same "latent API" as FLUX.1's VAE.
|
8 |
+
FLUX.1 is useful for real-time previewing of the FLUX.1 generation process.
|
9 |
+
|
10 |
+
This repo contains `.safetensors` versions of the TAEF1 weights.
|
11 |
+
|
12 |
+
## Using in 🧨 diffusers
|
13 |
+
|
14 |
+
```python
|
15 |
+
import torch
|
16 |
+
from diffusers import FluxPipeline, AutoencoderTiny
|
17 |
+
|
18 |
+
pipe = FluxPipeline.from_pretrained(
|
19 |
+
"black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16
|
20 |
+
)
|
21 |
+
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=torch.bfloat16)
|
22 |
+
pipe.enable_sequential_cpu_offload()
|
23 |
+
|
24 |
+
prompt = "slice of delicious New York-style berry cheesecake"
|
25 |
+
image = pipe(
|
26 |
+
prompt,
|
27 |
+
guidance_scale=0.0,
|
28 |
+
num_inference_steps=4,
|
29 |
+
max_sequence_length=256,
|
30 |
+
).images[0]
|
31 |
+
image.save("cheesecake.png")
|
32 |
+
```
|
33 |
+
|
34 |
+
|
35 |
+
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/630447d40547362a22a969a2/5FbkYmKc4JsULnskQmzLe.jpeg)
|
config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "AutoencoderTiny",
|
3 |
+
"_diffusers_version": "0.30.0",
|
4 |
+
"act_fn": "relu",
|
5 |
+
"block_out_channels": [
|
6 |
+
64,
|
7 |
+
64,
|
8 |
+
64,
|
9 |
+
64
|
10 |
+
],
|
11 |
+
"decoder_block_out_channels": [
|
12 |
+
64,
|
13 |
+
64,
|
14 |
+
64,
|
15 |
+
64
|
16 |
+
],
|
17 |
+
"encoder_block_out_channels": [
|
18 |
+
64,
|
19 |
+
64,
|
20 |
+
64,
|
21 |
+
64
|
22 |
+
],
|
23 |
+
"force_upcast": false,
|
24 |
+
"in_channels": 3,
|
25 |
+
"latent_channels": 16,
|
26 |
+
"latent_magnitude": 3,
|
27 |
+
"latent_shift": 0.5,
|
28 |
+
"num_decoder_blocks": [
|
29 |
+
3,
|
30 |
+
3,
|
31 |
+
3,
|
32 |
+
1
|
33 |
+
],
|
34 |
+
"num_encoder_blocks": [
|
35 |
+
1,
|
36 |
+
3,
|
37 |
+
3,
|
38 |
+
3
|
39 |
+
],
|
40 |
+
"out_channels": 3,
|
41 |
+
"scaling_factor": 1.0,
|
42 |
+
"shift_factor": 0.0,
|
43 |
+
"upsample_fn": "nearest",
|
44 |
+
"upsampling_scaling_factor": 2
|
45 |
+
}
|
diffusion_pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:96cfac57ad0d2314b0bd78065b97266063196ee65cfc082a85be4abb9c89915c
|
3 |
+
size 9879238
|
diffusion_pytorch_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:927f7de7f11bbd3b2d5ce402e608d97a7649e0921a9601995b044e8efc81e449
|
3 |
+
size 9848636
|