MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / DepthModel

Class DepthModel

lib/multi_depth_model_woauxi.py:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23class DepthModel(nn.Module):
24 def __init__(self, encoder):
25 super(DepthModel, self).__init__()
26 backbone = network.__name__.split('.')[-1] + '.' + encoder
27 self.encoder_modules = get_func(backbone)()
28 self.decoder_modules = network.Decoder()
29
30 def forward(self, x):
31 lateral_out = self.encoder_modules(x)
32 out_logit = self.decoder_modules(lateral_out)
33 return out_logit

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected