Skip to content

AI4ImagingLab/LatentDEM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LatentDEM: Blind Inversion using Latent Diffusion Priors (IEEE TIP 2026)

Paper

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.

⚙️ Getting Started

Our implementation is built directly upon the PSLD repository. Follow these steps to set up the environment.

1. Clone the Repository

Clone this repository, which includes the core PSLD framework and our modifications.

git clone [Your Repository URL]
cd [Repository Folder]

2. Set Up the Environment

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 ldm

Note: Before proceeding, ensure that the base samplers for both DPS and Stable Diffusion are functioning correctly as per the original PSLD instructions.

3. Download Pre-trained Model

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)

🚀 Running Experiments

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.

Blind Deblurring

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

📂 Repository Structure

  1. stable-diffusion/runforlatentDEM/: Contains all executable shell scripts for reproducing experiments.

  2. diffusion-posterior-sampling/dataforlatentDEM/: Contains the image data used for the paper's experiments.

Citation

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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors