comdoleger commited on
Commit
3256179
·
verified ·
1 Parent(s): 29bee02

Upload extensions_built_in/diffusion_models/omnigen2/src/models/transformers/components.py with huggingface_hub

Browse files
extensions_built_in/diffusion_models/omnigen2/src/models/transformers/components.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import torch.nn.functional as F
2
+
3
+ def swiglu(x, y):
4
+ return F.silu(x.float(), inplace=False).to(x.dtype) * y