MCPcopy Create free account
hub / github.com/Royalvice/DocDiff / forward

Method forward

model/DocDiff.py:332–337  ·  view source on GitHub ↗
(self, x, condition, t, diffusion)

Source from the content-addressed store, hash-verified

330 # self.init_predictor = UNet(input_channels, output_channels, 2 * n_channels, ch_mults, n_blocks)
331
332 def forward(self, x, condition, t, diffusion):
333 x_ = self.init_predictor(condition, t)
334 residual = x - x_
335 noisy_image, noise_ref = diffusion.noisy_image(t, residual)
336 x__ = self.denoiser(torch.cat((noisy_image, x_.clone().detach()), dim=1), t)
337 return x_, x__, noisy_image, noise_ref
338
339
340class EMA():

Callers

nothing calls this directly

Calls 1

noisy_imageMethod · 0.80

Tested by

no test coverage detected