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

Method __init__

diffsynth/models/wan_video_vae.py:58–66  ·  view source on GitHub ↗
(self, dim, channel_first=True, images=True, bias=False)

Source from the content-addressed store, hash-verified

56class RMS_norm(nn.Module):
57
58 def __init__(self, dim, channel_first=True, images=True, bias=False):
59 super().__init__()
60 broadcastable_dims = (1, 1, 1) if not images else (1, 1)
61 shape = (dim, *broadcastable_dims) if channel_first else (dim,)
62
63 self.channel_first = channel_first
64 self.scale = dim**0.5
65 self.gamma = nn.Parameter(torch.ones(shape))
66 self.bias = nn.Parameter(torch.zeros(shape)) if bias else 0.
67
68 def forward(self, x):
69 return F.normalize(

Callers 8

__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

no outgoing calls

Tested by

no test coverage detected