mirthAI / Fast-DDPM

MIT License
52 stars 7 forks source link

Defining the number of timesteps #1

Closed froestiago closed 3 months ago

froestiago commented 3 months ago

First of all, congratulations on the great work, and thanks for making it open-source!

I'm in doubt about how to set the number of time steps. On the provided config file for I2I translation (brats_linear.yml) the number of time steps under the diffusion: num_diffusion_timesteps is set to 1000, is this supposed to be for regular DDPM or Fast-DDPM? If it is for regular DDPM training, should I set the same parameter as 100 to train Fast-DDPM? And how does this diffusion: num_diffusion_timesteps relate to the --timesteps argument when calling fast_ddpm_main.py?

I really appreciate any help you can provide. Thanks!

Sebastianjhx commented 3 months ago

Hi, we appreciate your interest in our work.

Basically, the hyper diffusion: num_diffusion_timesteps controls the number of total time steps of the diffusion model, which is set to 1000 throughout all experiments on both Fast-DDPM and DDPM model. While the hyper --timesteps controls the number of involved time steps (define how many time steps you're gonna actually use in training and sampling out of the total 1000 time steps for acceleration), which is only related to Fast-DDPM.

Therefore, --timesteps is set to 1000 in the script for DDPM training, while it should be an integer less than 1000 in Fast-DDPM training (5, 10, 20, 50, 100 used in the paper).

Feel free to leave more comments regarding any other issues.

froestiago commented 3 months ago

Ok, I understand now!

Thank you :)

froestiago commented 3 months ago

.