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

Method __init__

diffsynth/models/wan_video_text_encoder.py:94–103  ·  view source on GitHub ↗
(self, dim, dim_ffn, dropout=0.1)

Source from the content-addressed store, hash-verified

92class T5FeedForward(nn.Module):
93
94 def __init__(self, dim, dim_ffn, dropout=0.1):
95 super(T5FeedForward, self).__init__()
96 self.dim = dim
97 self.dim_ffn = dim_ffn
98
99 # layers
100 self.gate = nn.Sequential(nn.Linear(dim, dim_ffn, bias=False), GELU())
101 self.fc1 = nn.Linear(dim, dim_ffn, bias=False)
102 self.fc2 = nn.Linear(dim_ffn, dim, bias=False)
103 self.dropout = nn.Dropout(dropout)
104
105 def forward(self, x):
106 x = self.fc1(x) * self.gate(x)

Callers

nothing calls this directly

Calls 2

GELUClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected