|
Download diffusers/docs/source/en/api/models/autoencoder_tiny.md from 6chan/Cobra: direct link, hf CLI and curl.
- Browser
- Download file 2.03 kB
-
https://huggingface.co/spaces/6chan/Cobra/resolve/main/diffusers/docs/source/en/api/models/autoencoder_tiny.md
- Command line
-
hf download hf://spaces/6chan/Cobra/diffusers/docs/source/en/api/models/autoencoder_tiny.md
-
curl -L -o autoencoder_tiny.md https://huggingface.co/spaces/6chan/Cobra/resolve/main/diffusers/docs/source/en/api/models/autoencoder_tiny.md
2.03 kB
A newer version of the Gradio SDK is available: 6.29.1
Tiny AutoEncoder
Tiny AutoEncoder for Stable Diffusion (TAESD) was introduced in madebyollin/taesd by Ollin Boer Bohan. It is a tiny distilled version of Stable Diffusion's VAE that can quickly decode the latents in a [StableDiffusionPipeline] or [StableDiffusionXLPipeline] almost instantly.
To use with Stable Diffusion v-2.1:
import torch
from diffusers import DiffusionPipeline, AutoencoderTiny
pipe = DiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-2-1-base", torch_dtype=torch.float16
)
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesd", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "slice of delicious New York-style berry cheesecake"
image = pipe(prompt, num_inference_steps=25).images[0]
image
To use with Stable Diffusion XL 1.0
import torch
from diffusers import DiffusionPipeline, AutoencoderTiny
pipe = DiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
)
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesdxl", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "slice of delicious New York-style berry cheesecake"
image = pipe(prompt, num_inference_steps=25).images[0]
image
AutoencoderTiny
[[autodoc]] AutoencoderTiny
AutoencoderTinyOutput
[[autodoc]] models.autoencoders.autoencoder_tiny.AutoencoderTinyOutput