Skip to content

Commit

Permalink
[Naming] correct config naming of DDIM pipeline (huggingface#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvonplaten authored Aug 16, 2022
1 parent 5201097 commit 7a399eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions schedulers/scheduling_ddim.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(
trained_betas=None,
timestep_values=None,
clip_sample=True,
clip_alpha_at_one=True,
set_alpha_to_one=True,
tensor_format="pt",
):

Expand All @@ -79,9 +79,9 @@ def __init__(

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

# setable values
self.num_inference_steps = None
Expand Down

0 comments on commit 7a399eb

Please sign in to comment.