"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "a5fc62f81957c739b1d4a8fd99bf551a2949dc3c"
Unverified Commit bf7f9b49 authored by Ian's avatar Ian Committed by GitHub
Browse files

Fix typing inconsistency in Euler discrete scheduler (#6052)

parent e192ae08
...@@ -270,7 +270,7 @@ class EulerDiscreteScheduler(SchedulerMixin, ConfigMixin): ...@@ -270,7 +270,7 @@ class EulerDiscreteScheduler(SchedulerMixin, ConfigMixin):
if self.config.interpolation_type == "linear": if self.config.interpolation_type == "linear":
sigmas = np.interp(timesteps, np.arange(0, len(sigmas)), sigmas) sigmas = np.interp(timesteps, np.arange(0, len(sigmas)), sigmas)
elif self.config.interpolation_type == "log_linear": elif self.config.interpolation_type == "log_linear":
sigmas = torch.linspace(np.log(sigmas[-1]), np.log(sigmas[0]), num_inference_steps + 1).exp() sigmas = torch.linspace(np.log(sigmas[-1]), np.log(sigmas[0]), num_inference_steps + 1).exp().numpy()
else: else:
raise ValueError( raise ValueError(
f"{self.config.interpolation_type} is not implemented. Please specify interpolation_type to either" f"{self.config.interpolation_type} is not implemented. Please specify interpolation_type to either"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment