Update model_management.py

This commit is contained in:
patientx 2024-08-30 20:08:18 +03:00 committed by GitHub
parent aeab6d1370
commit 3e226f02f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,11 +45,12 @@ cpu_state = CPUState.GPU
total_vram = 0 total_vram = 0
xpu_available = False #We don't have xpu with zluda , so disabling all together. xpu_available = False #We don't have xpu with zluda , so disabling all together.
# try: torch_version = ""
# torch_version = torch.version.__version__ try:
# xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available() torch_version = torch.version.__version__
# except: xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available()
# pass except:
pass
lowvram_available = True lowvram_available = True
if args.deterministic: if args.deterministic: