andreas128 / RePaint

Official PyTorch Code and Models of "RePaint: Inpainting using Denoising Diffusion Probabilistic Models", CVPR 2022
1.88k stars 153 forks source link

DDIM code doesn't work #44

Open Dendiiiii opened 11 months ago

Dendiiiii commented 11 months ago

I saw the respace.py file creates a DDIM skip time step, but when I set the , the code in the test.py file<sample_fn = (diffusion.p_sample_loop if not conf.use_ddim else diffusion.ddim_sample_loop)> does not work because there is no definition of the method .

Is the DDIM code unfinished?

How does the DDIM skip_type work with the resampling schedule?

JackPieCZ commented 10 months ago

The code is based on guided diffusion by OpenAI where there is an option to use DDIM. The line you mentioned is probably just a fragment of the old code that was left unnoticed.

StonyB commented 9 months ago

How did you solve this problem? how did you make the DDIM code work??

JackPieCZ commented 9 months ago

@StonyB During the process of reusing the OpenAI repo for inpainting many unnecessary functions were removed (DDIM etc). If you need this functionality you would have to manually add them from the original OpenAI repository. Personally, I didn't need this functionality so I just removed DDIM parameter in config file

StonyB commented 9 months ago

@JackpieCZ if i want to use DDIM, how should i add?

i am looking for it in "https://github.com/openai/guided-diffusion/blob/22e0df8183507e13a7813f8d38d51b072ca1e67c/guided_diffusion/gaussian_diffusion.py#L625"