README.md
December 9, 2025 · View on GitHub
[CVPR 2025] Alias-free Latent Diffusion Models
Yifan Zhou1
Zeqi Xiao1
Shuai Yang2
Xingang Pan1
1S-Lab, Nanyang Technological University,
2Wangxuan Institute of Computer Technology, Peking University
Project Page | Paper
Official PyTorch implementation of Alias-free latent diffusion models.
Motivation
https://github.com/user-attachments/assets/4fcd0c0f-4c0f-48a9-97dc-e5dcab9dd578
We found the VAE and denoising network in LDM are not equivariant to fractional shifts. We propose an alias-free framework to improve the fractional shift equivariance of LDM. We demonstrate the effectiveness of our method in various applications, including video editing, frame interpolation, super-resolution and normal estimation.
TODO
- Chinese blog posts
- Refine documents
- Training scripts
Update
- [12/2025]: Training code relased.
- [03/2025]: Repository created.
Installation
- Clone the repository. (Don't forget --recursive. Otherwise, please run git submodule update --init --recursive)
git clone git@github.com:SingleZombie/AFLDM.git --recursive
cd AFLDM
pip install -e .
-
Install PyTorch in your Python environment.
-
Install pip libraries.
pip install -r requirements.txt
Inference
All the detailed commands are shown inside .sh files.
Unconditional Generation Shift
bash shift_ldm_ffhq.sh
Video Editing
Due to the limitation of our computation resource, the finetuned alias-free Stable Diffusion has a poor generation capacity. It can only perform simple editing.
bash video_editing.sh
Image Interpolation
bash image_interpolation.sh
Super-resolution Shift
This is not a blind SR. The degradation function is fixed.
bash shift_ldm_sr.sh
Normal Estimation Shift
bash shift_normal_estimation.sh
Training
ImageNet Dataset
Download ImageNet (ILSVRC2012_img_train.tar) and extract the sub files. The organization of directory should be like:
train
├── n01440764
└── n01443537
...
Alias-free VAE
-
Update
train_data_dirwith your ImageNet path inconfigs/vae/train_afvae_imagenet.json. -
Run script.
bash train_afvae.sh
Alias-free LDM
-
Run script.
bash train_afldm.sh -
Update path in
scripts/shift_ldm_ffhq.pywithtrain_ckpt/ffhq_uncond_afldm(the default output diretory set inconfigs/ldm/train_unet_ffhq.json). Run the scriptbash shift_ldm_ffhq.shto test the results.
Alias-free Latent I2SB Super Resolution
-
Update
train_data_dirwith your ImageNet path inconfigs/sr/train_i2sb_imagenet.json. -
Run script.
bash train_af_i2sb_sr.sh -
Update path in
scripts/shift_ldm_sr.pywithtrain_ckpt/imagenet_sr_i2sb(the default output diretory set inconfigs/sr/train_i2sb_imagenet.json). Run the scriptbash shift_ldm_sr.shto test the results.
Citation
@inproceedings{zhou2025afldm,
title={Alias-Free Latent Diffusion Models: Improving Fractional Shift Equivariance of Diffusion Latent Space},
author={Zhou, Yifan and Xiao, Zeqi and Yang, Shuai and Pan, Xingang },
booktitle = {CVPR},
year = {2025},
}
Acknowledgements
- Diffusers: Our project is built on diffusers.
- GMFlow: Our flow estimator.
- StyleGAN3: For sharing alias-free module implementation.
- Alias-Free Convnets: For sharing alias-free module implementation.
- I2SB: For sharing SR implementation.
- StableNormal: For sharing normal estimation dataset.