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

Function FeedForward

diffsynth/models/flux_infiniteyou.py:7–14  ·  view source on GitHub ↗
(dim, mult=4)

Source from the content-addressed store, hash-verified

5
6# FFN
7def FeedForward(dim, mult=4):
8 inner_dim = int(dim * mult)
9 return nn.Sequential(
10 nn.LayerNorm(dim),
11 nn.Linear(dim, inner_dim, bias=False),
12 nn.GELU(),
13 nn.Linear(inner_dim, dim, bias=False),
14 )
15
16
17def reshape_tensor(x, heads):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected