MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / forward

Method forward

diffsynth/models/stepvideo_vae.py:706–727  ·  view source on GitHub ↗
(self, x, is_init=False)

Source from the content-addressed store, hash-verified

704 self.norm3 = BaseGroupNorm(32, num_filters)
705
706 def forward(self, x, is_init=False):
707 x = x.permute(0,2,3,4,1).contiguous()
708
709 residual = x
710
711 h = self.conv1(x, is_init)
712 h = self.norm1(h, act_silu=True, channel_last=True)
713
714 h = self.conv2(h, is_init)
715 h = self.norm2(h, act_silu=False, channel_last=True)
716
717 if self.down_sampling or self.num_filters != self.input_filters:
718 x = self.conv3(x, is_init)
719 x = self.norm3(x, act_silu=False, channel_last=True)
720
721 h.add_(x)
722 h = self.act_(h)
723 if residual is not None:
724 h.add_(residual)
725
726 h = h.permute(0,4,1,2,3)
727 return h
728
729class Upsample3D(nn.Module):
730 def __init__(self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected