From df500dcd47604083f7f21f7f92a6a2e5d9951184 Mon Sep 17 00:00:00 2001 From: drhead <1313496+drhead@users.noreply.github.com> Date: Sat, 18 May 2024 22:41:17 -0400 Subject: [PATCH] remove append_dims from to_d to allow sigmas on cpu --- k_diffusion/sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k_diffusion/sampling.py b/k_diffusion/sampling.py index 9f10e8d..2e76ae2 100644 --- a/k_diffusion/sampling.py +++ b/k_diffusion/sampling.py @@ -45,7 +45,7 @@ def get_sigmas_vp(n, beta_d=19.9, beta_min=0.1, eps_s=1e-3, device='cpu'): def to_d(x, sigma, denoised): """Converts a denoiser output to a Karras ODE derivative.""" - return (x - denoised) / utils.append_dims(sigma, x.ndim) + return (x - denoised) / sigma def get_ancestral_step(sigma_from, sigma_to, eta=1.):