Skip to content

Commit ae0e128

Browse files
committed
Refactor docstring in PNDMScheduler class to enhance clarity
- Simplified the explanation of the method for computing the previous sample from the current sample. - Updated the reference to the PNDM paper for better accessibility. - Removed redundant notation explanations to streamline the documentation.
1 parent 92d44da commit ae0e128

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/diffusers/schedulers/scheduling_pndm.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -403,18 +403,8 @@ def _get_prev_sample(
403403
self, sample: torch.Tensor, timestep: int, prev_timestep: int, model_output: torch.Tensor
404404
) -> torch.Tensor:
405405
"""
406-
Compute the previous sample x_(t-δ) from the current sample x_t using formula (9) from the PNDM paper.
407-
408-
See formula (9) of [PNDM paper](https://huggingface.co/papers/2202.09778)
409-
410-
Notation (<variable name> -> <name in paper>):
411-
- alpha_prod_t -> α_t
412-
- alpha_prod_t_prev -> α_(t−δ)
413-
- beta_prod_t -> (1 - α_t)
414-
- beta_prod_t_prev -> (1 - α_(t−δ))
415-
- sample -> x_t
416-
- model_output -> e_θ(x_t, t)
417-
- prev_sample -> x_(t−δ)
406+
Compute the previous sample x_(t-δ) from the current sample x_t using formula (9) from the [PNDM
407+
paper](https://huggingface.co/papers/2202.09778).
418408
419409
Args:
420410
sample (`torch.Tensor`):

0 commit comments

Comments
 (0)