Skip to content

Commit

Permalink
fix bug in dpm_solver_first_order_update
Browse files Browse the repository at this point in the history
  • Loading branch information
catwell committed Jan 18, 2024
1 parent 59db1f0 commit 999e429
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _generate_timesteps(self) -> Tensor:

def dpm_solver_first_order_update(self, x: Tensor, noise: Tensor, step: int) -> Tensor:
current_timestep = self.timesteps[step]
previous_timestep = self.timesteps[step + 1 if step < len(self.timesteps) - 1 else 0]
previous_timestep = self.timesteps[step + 1] if step < self.num_inference_steps - 1 else tensor([0])

previous_ratio = self.signal_to_noise_ratios[previous_timestep]
current_ratio = self.signal_to_noise_ratios[current_timestep]
Expand Down

0 comments on commit 999e429

Please sign in to comment.