Update model_management.py

This commit is contained in:
patientx 2025-02-14 12:33:27 +03:00 committed by GitHub
parent 97146c99c6
commit f125a37bdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,6 +25,7 @@ import sys
import platform import platform
import weakref import weakref
import gc import gc
import zluda
class VRAMState(Enum): class VRAMState(Enum):
DISABLED = 0 #No vram present: no need to move models to vram DISABLED = 0 #No vram present: no need to move models to vram
@ -249,10 +250,10 @@ except:
pass pass
if ENABLE_PYTORCH_ATTENTION: # if ENABLE_PYTORCH_ATTENTION:
torch.backends.cuda.enable_math_sdp(True) # torch.backends.cuda.enable_math_sdp(True)
torch.backends.cuda.enable_flash_sdp(True) # torch.backends.cuda.enable_flash_sdp(True)
torch.backends.cuda.enable_mem_efficient_sdp(True) # torch.backends.cuda.enable_mem_efficient_sdp(True)
try: try:
if is_nvidia() and args.fast: if is_nvidia() and args.fast: