Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
OmniGen2/OmniGen2
svjack
/
OmniGen2
like
0
Build error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
OmniGen2
/
omnigen2
/
models
/
transformers
/
components.py
sienna223
init
119e1fd
6 days ago
raw
Copy download link
history
blame
contribute
delete
Safe
110 Bytes
import
torch.nn.functional
as
F
def
swiglu
(
x, y
):
return
F.silu(x.
float
(), inplace=
False
).to(x.dtype) * y