Papers › DMPlug: A Plug-in Method for Solving Inverse Problems with Diffusion Models

DMPlug: A Plug-in Method for Solving Inverse Problems with Diffusion Models

27 May 2024arXiv:2405.16749archive 2025-07-28

Hengkang Wang, Xu Zhang, Taihui Li, Yuxiang Wan, Tiancong Chen, Ju Sun

Pretrained diffusion models (DMs) have recently been popularly used in solving inverse problems (IPs). The existing methods mostly interleave iterative steps in the reverse diffusion process and iterative steps to bring the iterates closer to satisfying the measurement constraint. However, such interleaving methods struggle to produce final results that look like natural objects of interest (i.e., manifold feasibility) and fit the measurement (i.e., measurement feasibility), especially for nonlinear IPs. Moreover, their capabilities to deal with noisy IPs with unknown types and levels of measurement noise are unknown. In this paper, we advocate viewing the reverse process in DMs as a function and propose a novel plug-in method for solving IPs using pretrained DMs, dubbed DMPlug. DMPlug addresses the issues of manifold feasibility and measurement feasibility in a principled manner, and also shows great potential for being robust to unknown types and levels of noise. Through extensive experiments across various IP tasks, including two linear and three nonlinear IPs, we demonstrate that DMPlug consistently outperforms state-of-the-art methods, often by large margins especially for nonlinear IPs. The code is available at https://github.com/sun-umn/DMPlug.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.16749")

Code

Syntology Ran 38 of 60 code samples harvested from 12 repositories linked to this paper; 22 have no recorded run. Of those that ran: 5 ran · honoured contract; 12 ran · our draft was wrong; 1 ran · fixture could not drive it; 20 ran with no contract checked.

By repository: official repository: 7 samples from 1 repository, 3 ran; found in paper text by Syntology: 51 samples from 11 repositories, 33 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

sun-umn/dmplug officialmentioned in papermentioned on GitHub report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

60 samples harvested; 38 ran; 5 honoured the contract we drafted; 22 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

5ran · honoured contract
12ran · our draft was wrong
1ran · fixture could not drive it
20ran
22unverified

Licence: 41 of the 60 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 12 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

load_yaml sun-umn/DMPlug/sr_inp_nonlinear.py official repository ran · our draft was wrong no licence file found · pointer only · 77224ae152b1372f · report
mask_generator sun-umn/dmplug/sr_inp_nonlinear.py official repository ran fingerprinted no licence file found · pointer only · 49f7ae5cbcb10534 · report
random_sq_bbox sun-umn/dmplug/sr_inp_nonlinear.py official repository ran · fixture could not drive it no licence file found · pointer only · b79aca843e426a89 · report
clear_color sun-umn/dmplug/sr_inp_nonlinear.py official repository unverified no licence file found · pointer only · 228f6454d1f15124 · report
dmplug sun-umn/dmplug/sr_inp_nonlinear.py official repository unverified no licence file found · pointer only · 0c188528aae11871 · report
get_noise sun-umn/dmplug/sr_inp_nonlinear.py official repository unverified no licence file found · pointer only · 6eb7012cf0ec3021 · report
get_operator sun-umn/dmplug/sr_inp_nonlinear.py official repository unverified no licence file found · pointer only · bbb1be64bf961d18 · report
center_crop_arr yuanzhi-zhu/DiffPIR/guided_diffusion/image_datasets.py found in paper text by Syntology ran · our draft was wrong MIT (permissive) · 8ab9a97df8161f31 · report
GaussianDiffusion jychoi118/ilvr_adm/guided_diffusion/respace.py found in paper text by Syntology ran MIT (permissive) · 8cb6b62758ca0c71 · report
ManifoldConstraintGradient ZehaoDou-official/FPS-SMC-2023/guided_diffusion/condition_methods.py found in paper text by Syntology ran no licence file found · pointer only · 3675e481e23792fa · report
PosteriorSampling soominkwon/resample/ldm_inverse/condition_methods.py found in paper text by Syntology ran no licence file found · pointer only · d22a74c8bb22f07f · report
PosteriorSampling_meng mengxiangming/dmps/guided_diffusion/condition_methods.py found in paper text by Syntology ran no licence file found · pointer only · 45edd4ab056a32fa · report
_WrappedModel BlindDPS/blind-dps/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology ran no licence file found · pointer only · 6701d38dd36970fa · report
act csdwren/SelfDeblur/models/common.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · e3edcd371d85dd22 · report
approx_standard_normal_cdf yuanzhi-zhu/DiffPIR/guided_diffusion/losses.py found in paper text by Syntology ran · our draft was wrong fingerprinted MIT (permissive) · cfd76fd0d89574a4 · report
betas_for_alpha_bar yuanzhi-zhu/DiffPIR/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology ran · honoured contract MIT (permissive) · 2ab2316ac6fdd869 · report
bn csdwren/SelfDeblur/models/common.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · cd7e7024386fb823 · report
compute_psnr pp00704831/Stripformer-ECCV-2022-/evaluate_RealBlur_J.py found in paper text by Syntology ran no licence file found · pointer only · 91fa50e293bf2fde · report
conv csdwren/SelfDeblur/models/common.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 040cc21cdcd6aae9 · report
conv_1x1_bn VITA-Group/DeblurGANv2/models/mobilenet_v2.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · a0131fb70c267a9e · report
conv_bn VITA-Group/DeblurGANv2/models/mobilenet_v2.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · e087cbfa1e53486d · report
create_window csdwren/SelfDeblur/SSIM.py found in paper text by Syntology ran · honoured contract fingerprinted no licence file found · pointer only · 6154e3744ece5728 · report
discretized_gaussian_log_likelihood yuanzhi-zhu/DiffPIR/guided_diffusion/losses.py found in paper text by Syntology ran · our draft was wrong MIT (permissive) · cd33283d615fb3d7 · report
gaussian csdwren/SelfDeblur/SSIM.py found in paper text by Syntology ran · honoured contract fingerprinted no licence file found · pointer only · c56b7ef16f309a45 · report
get_fullD VITA-Group/DeblurGANv2/models/networks.py found in paper text by Syntology ran licence not identified · pointer only · 0e96d793b5f1d7dd · report
get_kernel csdwren/SelfDeblur/models/downsampler.py found in paper text by Syntology ran no licence file found · pointer only · 7aa5f3eab66d010a · report
get_named_beta_schedule yuanzhi-zhu/DiffPIR/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology ran · honoured contract MIT (permissive) · a086d6286a40b889 · report
get_norm_layer VITA-Group/DeblurGANv2/models/networks.py found in paper text by Syntology ran licence not identified · pointer only · b63de0bdabb1c981 · report
get_param_groups_and_shapes yuanzhi-zhu/DiffPIR/guided_diffusion/fp16_util.py found in paper text by Syntology ran MIT (permissive) · e41367ad14ff58fd · report
get_transforms VITA-Group/DeblurGANv2/aug.py found in paper text by Syntology ran licence not identified · pointer only · d0f818fa0b61082c · report
hash_from_paths VITA-Group/DeblurGANv2/dataset.py found in paper text by Syntology ran licence not identified · pointer only · 49d0f322386ff244 · report
make_master_params yuanzhi-zhu/DiffPIR/guided_diffusion/fp16_util.py found in paper text by Syntology ran MIT (permissive) · e20dd5102da3b050 · report
make_output_format yuanzhi-zhu/DiffPIR/guided_diffusion/logger.py found in paper text by Syntology ran MIT (permissive) · bcd8b4acab199405 · report
normal_kl yuanzhi-zhu/DiffPIR/guided_diffusion/losses.py found in paper text by Syntology ran · honoured contract fingerprinted MIT (permissive) · cf2798b666b231ca · report
pnp_admm kanglin755/plug_and_play_admm/pnp.py found in paper text by Syntology ran MIT (permissive) · 408a3cd56a9879c6 · report
register_conditioning_method ZehaoDou-official/FPS-SMC-2023/guided_diffusion/condition_methods.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 8027fc71dcbcfc45 · report
split_into_buckets VITA-Group/DeblurGANv2/dataset.py found in paper text by Syntology ran licence not identified · pointer only · ff10ec72adb6df8c · report
test yuanzhi-zhu/DiffPIR/utils/utils_model.py found in paper text by Syntology ran MIT (permissive) · 8b2b14a90a19fbe2 · report
test_pad yuanzhi-zhu/DiffPIR/utils/utils_model.py found in paper text by Syntology ran MIT (permissive) · 666e66f755ba5374 · report
unflatten_master_params yuanzhi-zhu/DiffPIR/guided_diffusion/fp16_util.py found in paper text by Syntology ran MIT (permissive) · 64fff1e30802b815 · report
BlindDPS BlindDPS/blind-dps/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology unverified no licence file found · pointer only · f404eb41e1c72063 · report
ConditioningMethod ZehaoDou-official/FPS-SMC-2023/guided_diffusion/condition_methods.py found in paper text by Syntology unverified no licence file found · pointer only · 45abc6d9d49d023d · report
ConditioningMethod soominkwon/resample/ldm_inverse/condition_methods.py found in paper text by Syntology unverified no licence file found · pointer only · 424173e3f369bf65 · report
DDPM BlindDPS/blind-dps/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology unverified no licence file found · pointer only · fd913a588001391e · report
GaussianDiffusion BlindDPS/blind-dps/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology unverified no licence file found · pointer only · 4c395cb9de5462ee · report
SpacedDiffusion BlindDPS/blind-dps/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology unverified no licence file found · pointer only · 51ab54cb116c5d1b · report
SpacedDiffusion jychoi118/ilvr_adm/guided_diffusion/respace.py found in paper text by Syntology unverified MIT (permissive) · e8c5e9f4db80bfcb · report
clear_color BlindDPS/blind-dps/guided_diffusion/gaussian_diffusion.py found in paper text by Syntology unverified no licence file found · pointer only · edca27d48197ef50 · report
compute_ssim pp00704831/Stripformer-ECCV-2022-/evaluate_RealBlur_J.py found in paper text by Syntology unverified no licence file found · pointer only · 464c3d3b7a1eb4b3 · report
efficient_generalized_steps bahjat-kawar/ddrm/functions/denoising.py found in paper text by Syntology unverified MIT (permissive) · cbe30e9461c88717 · report
get_corrupt_function VITA-Group/DeblurGANv2/aug.py found in paper text by Syntology unverified licence not identified · pointer only · df49c8cd803b8af3 · report
get_loss pp00704831/Stripformer-ECCV-2022-/models/losses.py found in paper text by Syntology unverified licence not identified · pointer only · 1542a78f6b08854f · report
get_transforms pp00704831/Stripformer-ECCV-2022-/aug.py found in paper text by Syntology unverified licence not identified · pointer only · fca6d857d5c36155 · report
image_align pp00704831/Stripformer-ECCV-2022-/evaluate_RealBlur_J.py found in paper text by Syntology unverified licence not identified · pointer only · 5038ac50ef83af3a · report
mpi_weighted_mean yuanzhi-zhu/DiffPIR/guided_diffusion/logger.py found in paper text by Syntology unverified MIT (permissive) · e515a67f7f32e76d · report
profile yuanzhi-zhu/DiffPIR/guided_diffusion/logger.py found in paper text by Syntology unverified MIT (permissive) · 0c6607473a4c4c55 · report
random_crop_arr yuanzhi-zhu/DiffPIR/guided_diffusion/image_datasets.py found in paper text by Syntology unverified MIT (permissive) · 53d5be4fdbcfac23 · report
ssim csdwren/SelfDeblur/SSIM.py found in paper text by Syntology unverified no licence file found · pointer only · 9151c793f90473f0 · report
compute_alpha identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 9215fb189fbfb9f4 · report
register_sampler identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · d9bb4d03137bc7e9 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections