Skip to content

Commit d2b10b1

Browse files
asomozasayakpaul
andauthored
[SD3] TAESD3 docs (#8607)
* tased3 docs * apply suggestion --------- Co-authored-by: Sayak Paul <[email protected]>
1 parent 23a2cd3 commit d2b10b1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/source/en/api/pipelines/stable_diffusion/stable_diffusion_3.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,28 @@ image.save("sd3_hello_world.png")
197197

198198
Check out the full script [here](https://gist.github.com/sayakpaul/508d89d7aad4f454900813da5d42ca97).
199199

200+
## Tiny AutoEncoder for Stable Diffusion 3
201+
202+
Tiny AutoEncoder for Stable Diffusion (TAESD3) is a tiny distilled version of Stable Diffusion 3's VAE by [Ollin Boer Bohan](https://github.com/madebyollin/taesd) that can decode [`StableDiffusion3Pipeline`] latents almost instantly.
203+
204+
To use with Stable Diffusion 3:
205+
206+
```python
207+
import torch
208+
from diffusers import StableDiffusion3Pipeline, AutoencoderTiny
209+
210+
pipe = StableDiffusion3Pipeline.from_pretrained(
211+
"stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16
212+
)
213+
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesd3", torch_dtype=torch.float16)
214+
pipe.vae.config.shift_factor = 0.0
215+
pipe = pipe.to("cuda")
216+
217+
prompt = "slice of delicious New York-style berry cheesecake"
218+
image = pipe(prompt, num_inference_steps=25).images[0]
219+
image.save("cheesecake.png")
220+
```
221+
200222
## Loading the original checkpoints via `from_single_file`
201223

202224
The `SD3Transformer2DModel` and `StableDiffusion3Pipeline` classes support loading the original checkpoints via the `from_single_file` method. This method allows you to load the original checkpoint files that were used to train the models.

0 commit comments

Comments
 (0)