wyhuai / DDNM

[ICLR 2023 Oral] Zero-Shot Image Restoration Using Denoising Diffusion Null-Space Model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sanity Check

hosseinaskari-cs opened this issue · comments

I'm curious to understand why, when I comment out the projection step in the code, it fails to function as DDIM sampling and generate any output. It's puzzling why the sanity check isn't working. I am not getting any errors, but rather I am getting the following images for inpainting task where I removed the line related to the projection, i.e., converting x0_t_hat = x0_t - lambda_t*Ap(A(x0_t) - y) to x0_t_hat = x0_t.

239478777-1e293492-3c07-4822-b47e-7b24389abe38
239478753-82cf88e4-1eb5-42ef-aa43-795451a404a4

I think the operator may have problems. You can check if A(x) and Ap(A(x)) can generate reasonable results. By the way, which picture is the input, and which is the output? Can your model generate desired pictures without using DDNM?

Thanks for your reply.

But we are not using an operator at all. As I mentioned I converted this converting x0_t_hat = x0_t - lambda_t*Ap(A(x0_t) - y) to this one x0_t_hat = x0_t. In this case, we are sampling unconditionally or randomly. Both pictures are samples or outputs.

That‘s weird, did you use your own pretrained model? Can your own pretrained model work on other diffusion backbones, e.g., DDPM?

Not actually. I used the model you provided the link for, which is the same as the guided diffusion code. You can easily check your code. Just remove the inversion part ( x0_t_hat = x0_t - lambda_t*Ap(A(x0_t) - y) to this one x0_t_hat = x0_t.), then you get the same result.

I've checked the output of cases without the projection step on ImageNet dataset, and some of them does look weird. I will check the code and pretrained model later.

As the output has no direct relationship with proposed Zero-Range Decomposition, I guess it is likely the problem of pretrained model.

I re-write the code of loading & inference (sampling) of pretrained DPM model from OpenAI, and it possibily does not have enough generating ability to sample good images from pure noise with no guidance.
Besides, I have also tested the generating effect of model pretrained on CelebA-HQ dataset, and it is good.
Test results of pretrained model from OpenAI:
444f63704687664aacd12b906ca076b
47d2d4dd77731b8dff7dda40e19e15d
2e0a6ec505dacc9e79f98ab5814c30b

Test results of model pretrained on CelebA-HQ dataset:
6bce031a7a7b3a3edf698b3151d23a1