This fork of the official DPS repository is adapted to benchmark diffusion posterior sampling algorithms, including DPS, PiGDM, TMPD and DiffPIR against MMPS.
-
Clone the repository and its dependencies
git clone https://github.com/francois-rozet/mmps-benchmark cd mmps-benchmark git clone https://github.com/VinAIResearch/blur-kernel-space-exploring bkse git clone https://github.com/LeviBorodenko/motionblur motionblur
-
Install the Python dependencies
pip install torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu121 pip install -r requirements.txt
-
Download a checkpoint from link and place it into
./models
mkdir models mv ffhq_10m.pt ./models
-
Run an experiment
python run.py \ --model-config ./configs/model_ffhq_config.yaml \ --task-config ./configs/tasks/inpainting_random_config.yaml \ --method mmps --steps 100 --maxiter 5 \ --seed 42 \
The generated images are saved in
/results
and the metrics are written inmetrics.csv
.