This repository provides the official PyTorch implementation for the paper Blind Inversion using Latent Diffusion Priors.
LatentDEM is the first framework to solve blind inverse problems by leveraging pre-trained latent diffusion models. All experiments presented were performed using Stable Diffusion v1.5.
Our implementation is built directly upon the PSLD repository. Follow these steps to set up the environment.
Clone this repository, which includes the core PSLD framework and our modifications.
git clone [Your Repository URL]
cd [Repository Folder]We provide a Conda environment file. Use it to install the required dependencies.
# Navigate to the stable-diffusion directory
cd stable-diffusion
# Create and activate the conda environment
conda env create -f environment.yml
conda activate ldmNote: Before proceeding, ensure that the base samplers for both DPS and Stable Diffusion are functioning correctly as per the original PSLD instructions.
Download the Stable Diffusion v1.5 checkpoint into the stable-diffusion directory and put it into '/stable-diffusion/models/ldm/stable-diffusion-v1/'
wget [https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt](https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt)All experiment scripts are designed to be run from within the stable-diffusion directory.
Important: Before executing, please edit the shell scripts in stable-diffusion/runforlatentDEM/ to set the outdir variable to your desired output path.
To reproduce the blind deblurring results from the paper, execute the following commands:
sh runforlatentDEM/inverse_mb_girl.sh
sh runforlatentDEM/inverse_mb_Macaron.sh
sh runforlatentDEM/inverse_mb_man.sh
sh runforlatentDEM/inverse_mb_plant.sh-
stable-diffusion/runforlatentDEM/: Contains all executable shell scripts for reproducing experiments. -
diffusion-posterior-sampling/dataforlatentDEM/: Contains the image data used for the paper's experiments.
If you find our work useful in your research, please consider citing:
@article{bai2026blind,
title={Blind inversion using latent diffusion priors},
author={Bai, Weimin and Chen, Siyi and Chen, Wenzheng and Sun, He},
journal={IEEE Transactions on Image Processing},
year={2026}
}