Skip to content

Commit 1aedab7

Browse files
yiyixuxusayakpaul
andcommitted
fix singlestep dpm tests (#9716)
fix Co-authored-by: Sayak Paul <[email protected]>
1 parent 1051f21 commit 1aedab7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def set_timesteps(
330330
# Clipping the minimum of all lambda(t) for numerical stability.
331331
# This is critical for cosine (squaredcos_cap_v2) noise schedule.
332332
clipped_idx = torch.searchsorted(torch.flip(self.lambda_t, [0]), self.config.lambda_min_clipped)
333+
clipped_idx = clipped_idx.item()
333334
timesteps = (
334335
np.linspace(0, self.config.num_train_timesteps - 1 - clipped_idx, num_inference_steps + 1)
335336
.round()[::-1][:-1]

0 commit comments

Comments
 (0)