Constructs the noise schedule of Karras et al. (2022).
(n, sigma_min, sigma_max, rho=7., device='cpu')
| 15 | |
| 16 | |
| 17 | def get_sigmas_karras(n, sigma_min, sigma_max, rho=7., device='cpu'): |
| 18 | """Constructs the noise schedule of Karras et al. (2022).""" |
| 19 | ramp = torch.linspace(0, 1, n) |
| 20 | min_inv_rho = sigma_min ** (1 / rho) |
| 21 | max_inv_rho = sigma_max ** (1 / rho) |
| 22 | sigmas = (max_inv_rho + ramp * (min_inv_rho - max_inv_rho)) ** rho |
| 23 | return append_zero(sigmas).to(device) |
| 24 | |
| 25 | |
| 26 | def get_sigmas_exponential(n, sigma_min, sigma_max, device='cpu'): |
nothing calls this directly
no test coverage detected