1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

remove round

This commit is contained in:
yiyixuxu
2023-09-11 01:36:54 +00:00
parent a85a18c0ce
commit f238e0d862

View File

@@ -235,7 +235,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin):
# "linspace", "leading", "trailing" corresponds to annotation of Table 2. of https://arxiv.org/abs/2305.08891
if self.config.timestep_spacing == "linspace":
timesteps = np.linspace(0, last_timestep - 1, num_inference_steps).round()[::-1].copy().astype(np.float32)
timesteps = np.linspace(0, last_timestep - 1, num_inference_steps)[::-1].copy().astype(np.float32)
elif self.config.timestep_spacing == "leading":
step_ratio = last_timestep // self.num_inference_steps
# creates integer timesteps by multiplying by ratio