Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanity Check #46

Open
hosseinaskari-cs opened this issue Jun 30, 2023 · 7 comments
Open

Sanity Check #46

hosseinaskari-cs opened this issue Jun 30, 2023 · 7 comments

Comments

@hosseinaskari-cs
Copy link

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

@wyhuai
Copy link
Owner

wyhuai commented Jun 30, 2023

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?

@hosseinaskari-cs
Copy link
Author

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.

@wyhuai
Copy link
Owner

wyhuai commented Jun 30, 2023

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

@hosseinaskari-cs
Copy link
Author

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.

@LiRunyi2001
Copy link
Collaborator

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.

@LiRunyi2001
Copy link
Collaborator

LiRunyi2001 commented Jun 30, 2023

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

@LiRunyi2001
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants