MCPcopy Index your code
hub / github.com/VisionXLab/OF-Diff / predict_start_from_noise

Method predict_start_from_noise

ldm/models/diffusion/ddpm.py:291–295  ·  view source on GitHub ↗
(self, x_t, t, noise)

Source from the content-addressed store, hash-verified

289 return mean, variance, log_variance
290
291 def predict_start_from_noise(self, x_t, t, noise):
292 return (
293 extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t -
294 extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * noise
295 )
296
297 def predict_start_from_z_and_v(self, x_t, t, v):
298 # self.register_buffer('sqrt_alphas_cumprod', to_torch(np.sqrt(alphas_cumprod)))

Callers 3

p_mean_varianceMethod · 0.95
p_mean_varianceMethod · 0.80
p_lossesMethod · 0.80

Calls 1

extract_into_tensorFunction · 0.90

Tested by

no test coverage detected