You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/diffusers/training_utils.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -59,18 +59,18 @@ def set_seed(seed: int):
59
59
60
60
defcompute_snr(noise_scheduler, timesteps):
61
61
"""
62
-
Computes SNR as per https://github.com/TiankaiHang/Min-SNR-Diffusion-Training/blob/521b624bd70c67cee4bdf49225915f5945a872e3/guided_diffusion/gaussian_diffusion.py#L847-L849
62
+
Computes SNR as per https://github.com/TiankaiHang/Min-SNR-Diffusion-Training/blob/521b624bd70c67cee4bdf49225915f5945a872e3/guided_diffusion/gaussian_diffusion.py#L847-L849
63
63
for the given timesteps using the provided noise scheduler.
64
64
65
65
Args:
66
66
noise_scheduler (`NoiseScheduler`):
67
67
An object containing the noise schedule parameters, specifically `alphas_cumprod`, which is used
68
68
to compute the SNR values.
69
69
timesteps (`torch.Tensor`):
70
-
A tensor of timesteps for which the SNR is computed.
70
+
A tensor of timesteps for which the SNR is computed.
71
71
72
72
Returns:
73
-
`torch.Tensor`: A tensor containing the computed SNR values for each timestep.
73
+
`torch.Tensor`: A tensor containing the computed SNR values for each timestep.
0 commit comments