MCPcopy
hub / github.com/ali-vilab/AnyDoor / get_v

Method get_v

ldm/models/diffusion/ddpm.py:361–365  ·  view source on GitHub ↗
(self, x, noise, t)

Source from the content-addressed store, hash-verified

359 extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.shape) * noise)
360
361 def get_v(self, x, noise, t):
362 return (
363 extract_into_tensor(self.sqrt_alphas_cumprod, t, x.shape) * noise -
364 extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x.shape) * x
365 )
366
367 def get_loss(self, pred, target, mean=True):
368 if self.loss_type == 'l1':

Callers 2

p_lossesMethod · 0.95
p_lossesMethod · 0.80

Calls 1

extract_into_tensorFunction · 0.90

Tested by

no test coverage detected