(self, hidden_states, res_hidden_states_tuple, temb=None)
| 257 | self.upsamplers = nn.ModuleList([Upsample2D(out_channels)]) |
| 258 | |
| 259 | def forward(self, hidden_states, res_hidden_states_tuple, temb=None): |
| 260 | for resnet in self.resnets: |
| 261 | res_hidden_states = res_hidden_states_tuple[-1] |
| 262 | res_hidden_states_tuple = res_hidden_states_tuple[:-1] |
| 263 | hidden_states = torch.cat([hidden_states, res_hidden_states], |
| 264 | dim=1) |
| 265 | |
| 266 | hidden_states = resnet(hidden_states, temb) |
| 267 | |
| 268 | if self.upsamplers is not None: |
| 269 | for upsampler in self.upsamplers: |
| 270 | hidden_states = upsampler(hidden_states) |
| 271 | |
| 272 | return hidden_states |
| 273 | |
| 274 | |
| 275 | class CrossAttnDownBlock2D(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected