MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / get_sigmas_vp

Function get_sigmas_vp

k_diffusion/sampling.py:39–43  ·  view source on GitHub ↗

Constructs a continuous VP noise schedule.

(n, beta_d=19.9, beta_min=0.1, eps_s=1e-3, device='cpu')

Source from the content-addressed store, hash-verified

37
38
39def 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
46def to_d(x, sigma, denoised):

Callers

nothing calls this directly

Calls 1

append_zeroFunction · 0.85

Tested by

no test coverage detected