MCPcopy Create free account
hub / github.com/IceClear/StableSR / forward

Method forward

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

Source from the content-addressed store, hash-verified

905 padding=1)
906
907 def forward(self, x):
908 # upsampling
909 h = x
910 for k, i_level in enumerate(range(self.num_resolutions)):
911 for i_block in range(self.num_res_blocks + 1):
912 h = self.res_blocks[i_level][i_block](h, None)
913 if i_level != self.num_resolutions - 1:
914 h = self.upsample_blocks[k](h)
915 h = self.norm_out(h)
916 h = nonlinearity(h)
917 h = self.conv_out(h)
918 return h
919
920
921class LatentRescaler(nn.Module):

Callers

nothing calls this directly

Calls 1

nonlinearityFunction · 0.85

Tested by

no test coverage detected