MCPcopy Create free account
hub / github.com/LTH14/rcg / forward

Method forward

pixel_generator/guided_diffusion/unet.py:687–691  ·  view source on GitHub ↗
(self, x, timesteps, low_res=None, **kwargs)

Source from the content-addressed store, hash-verified

685 super().__init__(image_size, in_channels * 2, *args, **kwargs)
686
687 def forward(self, x, timesteps, low_res=None, **kwargs):
688 _, _, new_height, new_width = x.shape
689 upsampled = F.interpolate(low_res, (new_height, new_width), mode="bilinear")
690 x = th.cat([x, upsampled], dim=1)
691 return super().forward(x, timesteps, **kwargs)
692
693
694class EncoderUNetModel(nn.Module):

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected