(
self,
hidden_states: torch.FloatTensor,
temb: Optional[torch.FloatTensor] = None,
num_frames: int = 1,
)
| 645 | self.gradient_checkpointing = False |
| 646 | |
| 647 | def forward( |
| 648 | self, |
| 649 | hidden_states: torch.FloatTensor, |
| 650 | temb: Optional[torch.FloatTensor] = None, |
| 651 | num_frames: int = 1, |
| 652 | ) -> Union[torch.FloatTensor, Tuple[torch.FloatTensor, ...]]: |
| 653 | output_states = () |
| 654 | |
| 655 | for resnet, temp_conv in zip(self.resnets, self.temp_convs): |
| 656 | hidden_states = resnet(hidden_states, temb) |
| 657 | hidden_states = temp_conv(hidden_states, num_frames=num_frames) |
| 658 | |
| 659 | output_states += (hidden_states,) |
| 660 | |
| 661 | if self.downsamplers is not None: |
| 662 | for downsampler in self.downsamplers: |
| 663 | hidden_states = downsampler(hidden_states) |
| 664 | |
| 665 | output_states += (hidden_states,) |
| 666 | |
| 667 | return hidden_states, output_states |
| 668 | |
| 669 | |
| 670 | class CrossAttnUpBlock3D(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected