Downloads · 30 days
18
21% of all-time downloads
Luke100000/dc-ae-mini-f32c32-sana-1.1-diffusers
dc-ae-mini-f32c32-sana-1.1-diffusers is a machine learning model from Luke100000. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for diffusers.
A proof of concept that a smaller AE can cut inference time of Sana in half.
Downloads · 30 days
18
21% of all-time downloads
All-time downloads
85
Public
Parameters
31M
124 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors124 MB · 100%
From the Hugging Face model README
A proof of concept that a smaller AE can cut inference time of Sana in half.
Code is here: https://github.com/Luke100000/Mini-DC-AE
Training is suboptimal and blurry since I failed to replicate the GAN training from the paper.

Parameter count of the AE decoder reduced by 9x.

End-to-end inference time went down massively:


import torch
from diffusers import AutoencoderDC, SanaSprintPipeline
device = "cuda"
dtype = torch.float32 if device == "cpu" else torch.bfloat16
pipeline = SanaSprintPipeline.from_pretrained(
"Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers",
torch_dtype=dtype,
)
pipeline.vae = AutoencoderDC.from_pretrained(
"Luke100000/dc-ae-mini-f32c32-sana-1.1-diffusers",
torch_dtype=dtype,
low_cpu_mem_usage=False
)
pipeline.to(device=device, dtype=dtype)
pipeline(prompt="a tiny astronaut hatching from an egg on the moon", num_inference_steps=2, width=512, height=512).images[0]