2.4 KiB
2.4 KiB
AutoencoderDC
The 2D Autoencoder model used in SANA and introduced in DCAE by authors Junyu Chen, Han Cai, Junsong Chen, Enze Xie, Shang Yang, Haotian Tang, Muyang Li, Yao Lu, Song Han from MIT HAN Lab.
The following DCAE models are released and supported in Diffusers:
mit-han-lab/dc-ae-f32c32-sana-1.0mit-han-lab/dc-ae-f32c32-in-1.0mit-han-lab/dc-ae-f32c32-mix-1.0mit-han-lab/dc-ae-f64c128-in-1.0mit-han-lab/dc-ae-f64c128-mix-1.0mit-han-lab/dc-ae-f128c512-in-1.0mit-han-lab/dc-ae-f128c512-mix-1.0
The models can be loaded with the following code snippet.
from diffusers import AutoencoderDC
ae = AutoencoderDC.from_pretrained("mit-han-lab/dc-ae-f32c32-sana-1.0-diffusers", torch_dtype=torch.float32).to("cuda")
Single file loading
The AutoencoderDC implementation supports loading checkpoints shipped in the original format by MIT HAN Lab. The following example demonstrates how to load the f128c512 checkpoint:
from diffusers import AutoencoderDC
model_name = "dc-ae-f128c512-mix-1.0"
ae = AutoencoderDC.from_single_file(
f"https://huggingface.co/mit-han-lab/{model_name}/model.safetensors",
original_config=f"https://huggingface.co/mit-han-lab/{model_name}/resolve/main/config.json"
)
AutoencoderDC
autodoc AutoencoderDC - decode - all
DecoderOutput
autodoc models.autoencoders.vae.DecoderOutput