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

Wrong number of timesteps when num_inference_steps is not a divisor of num_train_timesteps #162

@Warvito

Description

@Warvito

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions