DiffuMatch: Category-Agnostic Spectral Diffusion Priors for Robust Non-rigid Shape Matching
September 22, 2025 · View on GitHub
DiffuMatch: Category-Agnostic Spectral Diffusion Priors for Robust Non-rigid Shape Matching
Emery Pierson1 Lei Li2Angela Dai2 Maks Ovsjanikov1
1Ecole polytechnique, France
2Technical University of Munich, Deutschland

Code release of the DiffuMatch paper, presented at ICCV 2025. A diffusion-based, zero-shot approach for non-rigid shape matching!
🛠️ Installation
# Clone the repository
git clone https://github.com/daidedou/diffumatch.git
Then install python>=3.9, pytorch>=2.5 with the method of your choice. I prefer conda (You can try with older version, it should work, as I did not use anything fancy. My guess is at least 1.8)
conda create -n diffumatch python=3.9
Run the command to install pytorch according to your version. For me it was:
conda activate diffumatch
conda install pytorch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 pytorch-cuda=12.4 -c pytorch -c nvidia
Then install the necessary packages
pip install -r requirements.txt
Note: In inference phase (training not affected), to be fast enough, our Zoomout implementation relies on Pykeops. Installation might fail from time to time (although it is much better since they switched to nvrtc). If you have problems with Pykeops, their github issues often have a solution for you! One of the common errors is ld cannot find -lnvrtc. The solution is to add cuda to library path:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda/lib
Befor launching any script/notebook.
Training the functional maps diffusion model
Download the Dynamic FAUST dataset here. Then, run
python preprocess_fmap_dataset.py --path dfaust_path
After that, run
python train_fmap.py
If you want to train a diffusion model on a different dataset, it should be possible if you save your shapes in a single folder and run the preprocess script with a different path and dataset argument. After that create a config file in config/diffuosion/custom_conf.yaml according to the dfaust_fmap template. The training is then:
python train_fmap.py --config custom_conf
The whole training relies of the EDM repository. Sorry if it is not compatible with your workflow.
Zero-shot shape matching
Matching two shapes
If you want to try the model, I suggest you to run the notebook, or alternatively the gradio demo script (may not be bug free). There is also a colab demo if you are brave enough to install the packages and debug (it is quite common that demos break after a single colab update).
python gradio_demo.py --config config/matching/sds.yaml
If you want to test your own trained diffusion model, modify the config lines:
diff_model:
train_dir: pretrained
to
diff_model:
train_dir: fmap_exps
diff_num_exp: num_exp
where num_exp is the number of your experiences in the fmap_exps folder (can be custom too).
Shape Non-rigid Kinematics (SNK)
We also provide a (non-official) reproduction of Shape Non-rigid Kinematics (SNK), and you can try it in snk_demo.ipynb or use snk.yaml config
Paper experiments
Read experiments.md
📜 License
This project is licensed under the Apache Licence.
Acknowledgements
Thanks to amazing deep functional functional maps repositories that were very useful for us (non-exhaustive):
And also
Citation
If you found our work useful, please cite
@article{pierson2025diffumatch,
title={DiffuMatch: Category-Agnostic Spectral Diffusion Priors for Robust Non-rigid Shape Matching},
author={Pierson, Emery and Li, Lei and Dai, Angela and Ovsjanikov, Maks},
journal={arXiv preprint arXiv:2507.23715},
year={2025}
}