(self, x, c, mask=None)
| 163 | return x * (1 + scale) + shift |
| 164 | |
| 165 | def forward(self, x, c, mask=None) -> torch.Tensor: |
| 166 | assert mask is not None |
| 167 | shift_msa, scale_msa, gate_msa, shift_mlp, scale_mlp, gate_mlp = self.adaLN_modulation(c).chunk(6, dim=-1) |
| 168 | x = x + gate_msa * self.attn(self.framewise_modulate(self.norm1(x), shift_msa, scale_msa), mask = mask) |
| 169 | x = x + gate_mlp * self.mlp(self.framewise_modulate(self.norm2(x), shift_mlp, scale_mlp)) |
| 170 | return x |
| 171 | |
| 172 | class Decoder(nn.Module): |
| 173 | """ |
nothing calls this directly
no test coverage detected