mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-09 23:12:02 +00:00
fix bug in dpm_solver_first_order_update
This commit is contained in:
parent
59db1f0bd5
commit
999e429697
|
@ -51,7 +51,7 @@ class DPMSolver(Scheduler):
|
|||
|
||||
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]
|
||||
|
|
Loading…
Reference in a new issue