mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-30 13:33:42 +08:00
.
This commit is contained in:
parent
35aa850c93
commit
3d2c4d48cd
@ -39,7 +39,7 @@ except ImportError:
|
|||||||
|
|
||||||
FLASH_ATTENTION_IS_AVAILABLE = False
|
FLASH_ATTENTION_IS_AVAILABLE = False
|
||||||
try:
|
try:
|
||||||
from flash_attn import flash_attn_func, flash_attn_varlen_func
|
from flash_attn import flash_attn_func
|
||||||
FLASH_ATTENTION_IS_AVAILABLE = True
|
FLASH_ATTENTION_IS_AVAILABLE = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
if model_management.flash_attention_enabled():
|
if model_management.flash_attention_enabled():
|
||||||
@ -87,6 +87,7 @@ def default(val, d):
|
|||||||
return val
|
return val
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
||||||
# feedforward
|
# feedforward
|
||||||
class GEGLU(nn.Module):
|
class GEGLU(nn.Module):
|
||||||
def __init__(self, dim_in, dim_out, dtype=None, device=None, operations=ops):
|
def __init__(self, dim_in, dim_out, dtype=None, device=None, operations=ops):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user