Skip to content

Commit 9070c39

Browse files
[Naming] correct config naming of DDIM pipeline (#187)
1 parent 194ed79 commit 9070c39

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/diffusers/schedulers/scheduling_ddim.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
trained_betas=None,
6060
timestep_values=None,
6161
clip_sample=True,
62-
clip_alpha_at_one=True,
62+
set_alpha_to_one=True,
6363
tensor_format="pt",
6464
):
6565

@@ -79,9 +79,9 @@ def __init__(
7979

8080
# At every step in ddim, we are looking into the previous alphas_cumprod
8181
# For the final step, there is no previous alphas_cumprod because we are already at 0
82-
# `clip_alpha_at_one` decides whether we set this paratemer simply to one or
82+
# `set_alpha_to_one` decides whether we set this paratemer simply to one or
8383
# whether we use the final alpha of the "non-previous" one.
84-
self.final_alpha_cumprod = np.array(1.0) if clip_alpha_at_one else self.alphas_cumprod[0]
84+
self.final_alpha_cumprod = np.array(1.0) if set_alpha_to_one else self.alphas_cumprod[0]
8585

8686
# setable values
8787
self.num_inference_steps = None

tests/test_modeling_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ def test_stable_diffusion_fast_ddim(self):
871871
beta_end=0.012,
872872
beta_schedule="scaled_linear",
873873
clip_sample=False,
874-
clip_alpha_at_one=False,
874+
set_alpha_to_one=False,
875875
)
876876
sd_pipe.scheduler = scheduler
877877

0 commit comments

Comments
 (0)