Official Implementation for paper: HypDAE: Hyperbolic Diffusion Autoencoders for Hierarchical Few-shot Image Generation
Python
11
21 commits
updated Dec 18, 2025
Lingxiao Li · Kaixuan Fan · Boqing Gong · Xiangyu Yue
International Conference on Computer Vision (ICCV), 2025
Abstract: Few-shot image generation aims to generate diverse and high-quality images for an unseen class given only a few examples in that class. A key challenge in this task is balancing category consistency and image diversity, which often compete with each other. Moreover, existing methods offer limited control over the attributes of newly generated images. In this work, we propose Hyperbolic Diffusion Autoencoders (HypDAE), a novel approach that operates in hyperbolic space to capture hierarchical relationships among images from seen categories. By leveraging pre-trained foundation models, HypDAE generates diverse new images for unseen categories with exceptional quality by varying stochastic subcodes or semantic codes. Most importantly, the hyperbolic representation introduces an additional degree of control over semantic diversity through the adjustment of radii within the hyperbolic disk.
Our codebase is built on TF-ICON and Paint-by-Example.
# Clone the repository
git clone [https://github.com/lingxiao-li/HypDAE.git](https://github.com/lingxiao-li/HypDAE.git)
cd HypDAE/HypDiffusion
# Create and activate the conda environment
conda env create -f hypdae_env.yaml
conda activate hypdae
Download the pre-trained HypDAE checkpoints from Hugging Face and place them in the checkpoints/ directory.
We use the following datasets for training and evaluation. Please download and unzip them into the data/ folder.
| Dataset | Link | Description |
|---|---|---|
| AnimalFaces | HuggingFace | 149 carnivorous animal classes |
| Flowers | HuggingFace | Oxford 102 Flower Dataset |
| VGGFaces | HuggingFace | Face recognition dataset |
| NABirds | Download | North America Birds dataset |
| FFHQ | Kaggle | Flickr-Faces-HQ Dataset |
Recommended Directory Structure:
HypDAE/
├── HypDiffusion/
├── data/
│ ├── animals/
│ ├── flowers/
│ ├── vggfaces/
│ ├── nabirds/
│ └── ffhq/
└── ...
We provide two modes for inference: interactive notebook demo and batch generation script.
For interactive visualization and testing, use the provided Jupyter Notebook. You can modify the file paths inside the notebook to test different images.
# Open the notebook
jupyter notebook HypDiffusion/test_ddim.ipynb
For batch generation and evaluation, run the following script. You can adjust the parameters (e.g., related paths) inside the script or pass them as arguments.
# Run batch inference
sh HypDiffusion/inference_for_eva.py
This project is based on TF-ICON and Paint-by-Example. We thank the authors for their open-source contributions.
If you find this code or our paper useful for your research, please consider citing:
@inproceedings{Li25HypDAE,
title = {HypDAE: Hyperbolic Diffusion Autoencoders for Hierarchical Few-shot Image Generation},
author = {Lingxiao Li and Kaixuan Fan and Boqing Gong and Xiangyu Yue},
booktitle = {International Conference on Computer Vision (ICCV)},
year = {2025}
}
Official Implementation for paper: HypDAE: Hyperbolic Diffusion Autoencoders for Hierarchical Few-shot Image Generation
Python
11
21 commits
updated Dec 18, 2025
Lingxiao Li · Kaixuan Fan · Boqing Gong · Xiangyu Yue
International Conference on Computer Vision (ICCV), 2025
Abstract: Few-shot image generation aims to generate diverse and high-quality images for an unseen class given only a few examples in that class. A key challenge in this task is balancing category consistency and image diversity, which often compete with each other. Moreover, existing methods offer limited control over the attributes of newly generated images. In this work, we propose Hyperbolic Diffusion Autoencoders (HypDAE), a novel approach that operates in hyperbolic space to capture hierarchical relationships among images from seen categories. By leveraging pre-trained foundation models, HypDAE generates diverse new images for unseen categories with exceptional quality by varying stochastic subcodes or semantic codes. Most importantly, the hyperbolic representation introduces an additional degree of control over semantic diversity through the adjustment of radii within the hyperbolic disk.
Our codebase is built on TF-ICON and Paint-by-Example.
# Clone the repository
git clone [https://github.com/lingxiao-li/HypDAE.git](https://github.com/lingxiao-li/HypDAE.git)
cd HypDAE/HypDiffusion
# Create and activate the conda environment
conda env create -f hypdae_env.yaml
conda activate hypdae
Download the pre-trained HypDAE checkpoints from Hugging Face and place them in the checkpoints/ directory.
We use the following datasets for training and evaluation. Please download and unzip them into the data/ folder.
| Dataset | Link | Description |
|---|---|---|
| AnimalFaces | HuggingFace | 149 carnivorous animal classes |
| Flowers | HuggingFace | Oxford 102 Flower Dataset |
| VGGFaces | HuggingFace | Face recognition dataset |
| NABirds | Download | North America Birds dataset |
| FFHQ | Kaggle | Flickr-Faces-HQ Dataset |
Recommended Directory Structure:
HypDAE/
├── HypDiffusion/
├── data/
│ ├── animals/
│ ├── flowers/
│ ├── vggfaces/
│ ├── nabirds/
│ └── ffhq/
└── ...
We provide two modes for inference: interactive notebook demo and batch generation script.
For interactive visualization and testing, use the provided Jupyter Notebook. You can modify the file paths inside the notebook to test different images.
# Open the notebook
jupyter notebook HypDiffusion/test_ddim.ipynb
For batch generation and evaluation, run the following script. You can adjust the parameters (e.g., related paths) inside the script or pass them as arguments.
# Run batch inference
sh HypDiffusion/inference_for_eva.py
This project is based on TF-ICON and Paint-by-Example. We thank the authors for their open-source contributions.
If you find this code or our paper useful for your research, please consider citing:
@inproceedings{Li25HypDAE,
title = {HypDAE: Hyperbolic Diffusion Autoencoders for Hierarchical Few-shot Image Generation},
author = {Lingxiao Li and Kaixuan Fan and Boqing Gong and Xiangyu Yue},
booktitle = {International Conference on Computer Vision (ICCV)},
year = {2025}
}