MCPcopy Create free account
hub / github.com/MegaScenes/nvs / forward

Method forward

ldm/modules/diffusionmodules/model.py:641–652  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

639 padding=1)
640
641 def forward(self, x):
642 # upsampling
643 h = x
644 for k, i_level in enumerate(range(self.num_resolutions)):
645 for i_block in range(self.num_res_blocks + 1):
646 h = self.res_blocks[i_level][i_block](h, None)
647 if i_level != self.num_resolutions - 1:
648 h = self.upsample_blocks[k](h)
649 h = self.norm_out(h)
650 h = nonlinearity(h)
651 h = self.conv_out(h)
652 return h
653
654
655class LatentRescaler(nn.Module):

Callers

nothing calls this directly

Calls 1

nonlinearityFunction · 0.85

Tested by

no test coverage detected