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

Method __init__

diffsynth/models/stepvideo_vae.py:467–476  ·  view source on GitHub ↗
(self,
        in_channels
    )

Source from the content-addressed store, hash-verified

465
466class AttnBlock(nn.Module):
467 def __init__(self,
468 in_channels
469 ):
470 super().__init__()
471
472 self.norm = BaseGroupNorm(num_groups=32, num_channels=in_channels)
473 self.q = CausalConvChannelLast(in_channels, in_channels, kernel_size=1)
474 self.k = CausalConvChannelLast(in_channels, in_channels, kernel_size=1)
475 self.v = CausalConvChannelLast(in_channels, in_channels, kernel_size=1)
476 self.proj_out = CausalConvChannelLast(in_channels, in_channels, kernel_size=1)
477
478 def attention(self, x, is_init=True):
479 x = self.norm(x, act_silu=False, channel_last=True)

Callers 15

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

BaseGroupNormClass · 0.85

Tested by

no test coverage detected