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

Class BaseGroupNorm

diffsynth/models/stepvideo_vae.py:21–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21class BaseGroupNorm(nn.GroupNorm):
22 def __init__(self, num_groups, num_channels):
23 super().__init__(num_groups=num_groups, num_channels=num_channels)
24
25 def forward(self, x, zero_pad=False, **kwargs):
26 if zero_pad:
27 return base_group_norm_with_zero_pad(x, self, **kwargs)
28 else:
29 return base_group_norm(x, self, **kwargs)
30
31
32def base_group_norm(x, norm_layer, act_silu=False, channel_last=False):

Callers 3

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected