(self, x: Tensor, vec: Tensor)
| 500 | self.adaLN_modulation = nn.Sequential(nn.SiLU(), nn.Linear(hidden_size, 2 * hidden_size, bias=True)) |
| 501 | |
| 502 | def forward(self, x: Tensor, vec: Tensor) -> Tensor: |
| 503 | shift, scale = self.adaLN_modulation(vec).chunk(2, dim=1) |
| 504 | x = (1 + scale[:, None, :]) * self.norm_final(x) + shift[:, None, :] |
| 505 | x = self.linear(x) |
| 506 | return x |
| 507 | |
| 508 | |
| 509 | if __name__ == '__main__': |
nothing calls this directly
no outgoing calls
no test coverage detected