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

Method forward

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

Source from the content-addressed store, hash-verified

820 return c
821
822 def forward(self,x):
823 z_fs = self.encode_with_pretrained(x)
824 z = self.proj_norm(z_fs)
825 z = self.proj(z)
826 z = nonlinearity(z)
827
828 for submodel, downmodel in zip(self.model,self.downsampler):
829 z = submodel(z,temb=None)
830 z = downmodel(z)
831
832 if self.do_reshape:
833 z = rearrange(z,'b c h w -> b (h w) c')
834 return z
835

Callers

nothing calls this directly

Calls 2

nonlinearityFunction · 0.85

Tested by

no test coverage detected