mirror of
https://github.com/huggingface/candle.git
synced 2025-06-20 12:06:35 +00:00
Fixes for clippy 1.87. (#2956)
This commit is contained in:
@ -134,12 +134,7 @@ impl Scheduler for DDIMScheduler {
|
||||
timestep
|
||||
};
|
||||
// https://github.com/huggingface/diffusers/blob/6e099e2c8ce4c4f5c7318e970a8c093dc5c7046e/src/diffusers/schedulers/scheduling_ddim.py#L195
|
||||
let prev_timestep = if timestep > self.step_ratio {
|
||||
timestep - self.step_ratio
|
||||
} else {
|
||||
0
|
||||
};
|
||||
|
||||
let prev_timestep = timestep.saturating_sub(self.step_ratio);
|
||||
let alpha_prod_t = self.alphas_cumprod[timestep];
|
||||
let alpha_prod_t_prev = self.alphas_cumprod[prev_timestep];
|
||||
let beta_prod_t = 1. - alpha_prod_t;
|
||||
|
Reference in New Issue
Block a user