MCPcopy Create free account
hub / github.com/CompVis/diff2flow / predict_start_from_noise

Method predict_start_from_noise

diff2flow/ddpm.py:269–273  ·  view source on GitHub ↗
(self, x_t, t, noise)

Source from the content-addressed store, hash-verified

267 """ Sampling """
268
269 def predict_start_from_noise(self, x_t, t, noise):
270 return (
271 extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t -
272 extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * noise
273 )
274
275 def predict_start_from_z_and_v(self, x_t, t, v):
276 return (

Callers 1

p_mean_varianceMethod · 0.95

Calls 1

extract_into_tensorFunction · 0.70

Tested by

no test coverage detected