Skip to content

Commit

Permalink
NumPy array is created
Browse files Browse the repository at this point in the history
The 'sigmas' is created as numpy array instead of tensor.
  • Loading branch information
Senume authored Dec 5, 2023
1 parent 6cac792 commit 0601382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diffusers/schedulers/scheduling_euler_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,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 = np.exp(np.linspace(np.log(sigmas[-1]), np.log(sigmas[0]), num_inference_steps + 1))
else:
raise ValueError(
f"{self.config.interpolation_type} is not implemented. Please specify interpolation_type to either"
Expand Down

0 comments on commit 0601382

Please sign in to comment.