MCPcopy Create free account
hub / github.com/KohakuBlueleaf/HyperKohaku / forward

Method forward

modules/hypernet.py:83–89  ·  view source on GitHub ↗
(self, weight, features)

Source from the content-addressed store, hash-verified

81 # torch.nn.init.normal_(self.delta_proj[1].weight, std=1e-3)
82
83 def forward(self, weight, features):
84 pos_emb = self.pos_emb_proj(self.block_pos_emb[:, :weight.size(1)].clone().detach())
85 h = weight + pos_emb
86 for decoder in self.decoder_model:
87 h = decoder(h, context=features)
88 weight = weight + self.delta_proj(h)
89 return weight
90
91
92class ImgWeightGenerator(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected