Skip to content

Commit e6d30e2

Browse files
authored
Fix typing inconsistency in Euler discrete scheduler (huggingface#6052)
1 parent a61bb6b commit e6d30e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

schedulers/scheduling_euler_discrete.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def set_timesteps(self, num_inference_steps: int, device: Union[str, torch.devic
270270
if self.config.interpolation_type == "linear":
271271
sigmas = np.interp(timesteps, np.arange(0, len(sigmas)), sigmas)
272272
elif self.config.interpolation_type == "log_linear":
273-
sigmas = torch.linspace(np.log(sigmas[-1]), np.log(sigmas[0]), num_inference_steps + 1).exp()
273+
sigmas = torch.linspace(np.log(sigmas[-1]), np.log(sigmas[0]), num_inference_steps + 1).exp().numpy()
274274
else:
275275
raise ValueError(
276276
f"{self.config.interpolation_type} is not implemented. Please specify interpolation_type to either"

0 commit comments

Comments
 (0)