MCPcopy
hub / github.com/XPixelGroup/DiffBIR / to_d

Function to_d

diffbir/sampler/k_diffusion.py:51–53  ·  view source on GitHub ↗

Converts a denoiser output to a Karras ODE derivative.

(x, sigma, denoised)

Source from the content-addressed store, hash-verified

49
50
51def to_d(x, sigma, denoised):
52 """Converts a denoiser output to a Karras ODE derivative."""
53 return (x - denoised) / append_dims(sigma, x.ndim)
54
55
56def get_ancestral_step(sigma_from, sigma_to, eta=1.):

Callers 8

sample_eulerFunction · 0.85
sample_euler_ancestralFunction · 0.85
sample_heunFunction · 0.85
sample_dpm_2Function · 0.85
sample_dpm_2_ancestralFunction · 0.85
sample_lmsFunction · 0.85
sample_dpmpp_sdeFunction · 0.85

Calls 1

append_dimsFunction · 0.85

Tested by

no test coverage detected