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

Method forward

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

Source from the content-addressed store, hash-verified

1089 return c
1090
1091 def forward(self,x):
1092 z_fs = self.encode_with_pretrained(x)
1093 z = self.proj_norm(z_fs)
1094 z = self.proj(z)
1095 z = nonlinearity(z)
1096
1097 for submodel, downmodel in zip(self.model,self.downsampler):
1098 z = submodel(z,temb=None)
1099 z = downmodel(z)
1100
1101 if self.do_reshape:
1102 z = rearrange(z,'b c h w -> b (h w) c')
1103 return z

Callers

nothing calls this directly

Calls 2

nonlinearityFunction · 0.85

Tested by

no test coverage detected