This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Description
As reported in here, the code that we used as base for the DDPM scheduler have a problem when using a num_inference_steps when it is not a divisor of num_train_timesteps.
For example
from generative.networks.schedulers import DDPMScheduler
scheduler = DDPMScheduler(num_train_timesteps=1000)
scheduler.set_timesteps(53)
len(ddpm.timesteps) # 56
Using a similar approach as the one implemented in DDIM should solve it. Besides that, we should introduce a error in case the user want to use a num_inference_steps bigger than the num_train_timesteps.