madebyollin
commited on
Commit
•
2d55237
1
Parent(s):
5463ee6
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
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)
|