Skip to content

Commit

Permalink
Fix typing inconsistency in Euler discrete scheduler (huggingface#6052)
Browse files Browse the repository at this point in the history
  • Loading branch information
iabaldwin authored Dec 6, 2023
1 parent a61bb6b commit e6d30e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schedulers/scheduling_euler_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def set_timesteps(self, num_inference_steps: int, device: Union[str, torch.devic
if self.config.interpolation_type == "linear":
sigmas = np.interp(timesteps, np.arange(0, len(sigmas)), sigmas)
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:
raise ValueError(
f"{self.config.interpolation_type} is not implemented. Please specify interpolation_type to either"
Expand Down

0 comments on commit e6d30e2

Please sign in to comment.