| 252 | |
| 253 | |
| 254 | class HybridConditioner(nn.Module): |
| 255 | |
| 256 | def __init__(self, c_concat_config, c_crossattn_config): |
| 257 | super().__init__() |
| 258 | self.concat_conditioner = instantiate_from_config(c_concat_config) |
| 259 | self.crossattn_conditioner = instantiate_from_config(c_crossattn_config) |
| 260 | |
| 261 | def forward(self, c_concat, c_crossattn): |
| 262 | c_concat = self.concat_conditioner(c_concat) |
| 263 | c_crossattn = self.crossattn_conditioner(c_crossattn) |
| 264 | return {'c_concat': [c_concat], 'c_crossattn': [c_crossattn]} |
| 265 | |
| 266 | |
| 267 | def noise_like(shape, device, repeat=False): |
nothing calls this directly
no outgoing calls
no test coverage detected