MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / init_weight

Method init_weight

wan/modules/vae.py:162–172  ·  view source on GitHub ↗
(self, conv)

Source from the content-addressed store, hash-verified

160 return x
161
162 def init_weight(self, conv):
163 conv_weight = conv.weight
164 nn.init.zeros_(conv_weight)
165 c1, c2, t, h, w = conv_weight.size()
166 one_matrix = torch.eye(c1, c2)
167 init_matrix = one_matrix
168 nn.init.zeros_(conv_weight)
169 #conv_weight.data[:,:,-1,1,1] = init_matrix * 0.5
170 conv_weight.data[:, :, 1, 0, 0] = init_matrix #* 0.5
171 conv.weight.data.copy_(conv_weight)
172 nn.init.zeros_(conv.bias.data)
173
174 def init_weight2(self, conv):
175 conv_weight = conv.weight.data

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected