Skip to content

Commit aff1364

Browse files
delmalihclaude
andcommitted
Apply review feedback on scheduling_ddim.py
- Replace "prevent singularities" with "avoid numerical instability" for better clarity - Add backticks around `alpha_bar` variable name for consistent formatting - Convert Imagen Video paper URLs to Hugging Face papers references 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 26f0ca1 commit aff1364

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/diffusers/schedulers/scheduling_ddim.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ def betas_for_alpha_bar(
6464
num_diffusion_timesteps (`int`):
6565
The number of betas to produce.
6666
max_beta (`float`, defaults to 0.999):
67-
The maximum beta to use; use values lower than 1 to prevent singularities.
67+
The maximum beta to use; use values lower than 1 to avoid numerical instability.
6868
alpha_transform_type (`Literal["cosine", "exp"]`, defaults to `"cosine"`):
69-
The type of noise schedule for alpha_bar. Must be one of `"cosine"` or `"exp"`.
69+
The type of noise schedule for `alpha_bar`. Must be one of `"cosine"` or `"exp"`.
7070
7171
Returns:
7272
`torch.Tensor`: The betas used by the scheduler to step the model outputs.
@@ -160,7 +160,7 @@ class DDIMScheduler(SchedulerMixin, ConfigMixin):
160160
prediction_type (`Literal["epsilon", "sample", "v_prediction"]`, defaults to `"epsilon"`):
161161
Prediction type of the scheduler function. Must be one of `"epsilon"` (predicts the noise of the diffusion
162162
process), `"sample"` (directly predicts the noisy sample), or `"v_prediction"` (see section 2.4 of [Imagen
163-
Video](https://imagen.research.google/video/paper.pdf) paper).
163+
Video](https://huggingface.co/papers/2210.02303) paper).
164164
thresholding (`bool`, defaults to `False`):
165165
Whether to use the "dynamic thresholding" method. This is unsuitable for latent-space diffusion models such
166166
as Stable Diffusion.
@@ -556,7 +556,7 @@ def get_velocity(self, sample: torch.Tensor, noise: torch.Tensor, timesteps: tor
556556
sample`
557557
558558
This is used in v-prediction models where the model directly predicts the velocity instead of the noise or the
559-
sample. See section 2.4 of Imagen Video paper: https://imagen.research.google/video/paper.pdf
559+
sample. See section 2.4 of [Imagen Video](https://huggingface.co/papers/2210.02303) paper.
560560
561561
Args:
562562
sample (`torch.Tensor`):

0 commit comments

Comments
 (0)