Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenImagingLab/FlashVSR
/ swiglu
Method
swiglu
diffsynth/models/stepvideo_text_encoder.py:385–387 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
383
384
hidden_dim = multiple_of * ((hidden_dim + multiple_of - 1) // multiple_of)
385
def
swiglu(x):
386
x = torch.chunk(x, 2, dim=-1)
387
return
F.silu(x[0]) * x[1]
388
self.swiglu = swiglu
389
390
self.w1 = nn.Linear(
Callers
1
forward
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected