mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-11 12:06:23 +00:00
Disable xformers in VAE when xformers == 0.0.18
This commit is contained in:
@@ -199,11 +199,25 @@ def get_autocast_device(dev):
|
||||
return dev.type
|
||||
return "cuda"
|
||||
|
||||
|
||||
def xformers_enabled():
|
||||
if vram_state == CPU:
|
||||
return False
|
||||
return XFORMERS_IS_AVAILBLE
|
||||
|
||||
|
||||
def xformers_enabled_vae():
|
||||
enabled = xformers_enabled()
|
||||
if not enabled:
|
||||
return False
|
||||
try:
|
||||
#0.0.18 has a bug where Nan is returned when inputs are too big (1152x1920 res images and above)
|
||||
if xformers.version.__version__ == "0.0.18":
|
||||
return False
|
||||
except:
|
||||
pass
|
||||
return enabled
|
||||
|
||||
def pytorch_attention_enabled():
|
||||
return ENABLE_PYTORCH_ATTENTION
|
||||
|
||||
|
Reference in New Issue
Block a user