MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / forward

Method forward

architecture/autoencoder_kl_wan.py:757–780  ·  view source on GitHub ↗

Forward pass through the upsampling block. Args: x (torch.Tensor): Input tensor feat_cache (list, optional): Feature cache for causal convolutions feat_idx (list, optional): Feature index for cache management Returns: torch.T

(self, x, feat_cache=None, feat_idx=[0], first_chunk=None)

Source from the content-addressed store, hash-verified

755 self.gradient_checkpointing = False
756
757 def forward(self, x, feat_cache=None, feat_idx=[0], first_chunk=None):
758 """
759 Forward pass through the upsampling block.
760
761 Args:
762 x (torch.Tensor): Input tensor
763 feat_cache (list, optional): Feature cache for causal convolutions
764 feat_idx (list, optional): Feature index for cache management
765
766 Returns:
767 torch.Tensor: Output tensor
768 """
769 for resnet in self.resnets:
770 if feat_cache is not None:
771 x = resnet(x, feat_cache, feat_idx)
772 else:
773 x = resnet(x)
774
775 if self.upsamplers is not None:
776 if feat_cache is not None:
777 x = self.upsamplers[0](x, feat_cache, feat_idx)
778 else:
779 x = self.upsamplers[0](x)
780 return x
781
782
783class WanDecoder3d(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected