MCPcopy Create free account
hub / github.com/KlingAIResearch/LivePortrait / __init__

Method __init__

src/modules/util.py:192–198  ·  view source on GitHub ↗
(self, block_expansion, in_features, num_blocks=3, max_features=256)

Source from the content-addressed store, hash-verified

190 """
191
192 def __init__(self, block_expansion, in_features, num_blocks=3, max_features=256):
193 super(Encoder, self).__init__()
194
195 down_blocks = []
196 for i in range(num_blocks):
197 down_blocks.append(DownBlock3d(in_features if i == 0 else min(max_features, block_expansion * (2 ** i)), min(max_features, block_expansion * (2 ** (i + 1))), kernel_size=3, padding=1))
198 self.down_blocks = nn.ModuleList(down_blocks)
199
200 def forward(self, x):
201 outs = [x]

Callers

nothing calls this directly

Calls 2

DownBlock3dClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected