Constructs a continuous VP noise schedule.
(n, beta_d=19.9, beta_min=0.1, eps_s=1e-3, device='cpu')
| 37 | |
| 38 | |
| 39 | def get_sigmas_vp(n, beta_d=19.9, beta_min=0.1, eps_s=1e-3, device='cpu'): |
| 40 | """Constructs a continuous VP noise schedule.""" |
| 41 | t = torch.linspace(1, eps_s, n, device=device) |
| 42 | sigmas = torch.sqrt(torch.exp(beta_d * t ** 2 / 2 + beta_min * t) - 1) |
| 43 | return append_zero(sigmas) |
| 44 | |
| 45 | |
| 46 | def to_d(x, sigma, denoised): |
nothing calls this directly
no test coverage detected