fix for intel memory (#3513)

This commit is contained in:
Lei Zhenyuan 2025-10-27 14:12:18 +08:00 committed by GitHub
commit 57a03c35f4

View file

@ -1014,7 +1014,8 @@ def get_statistics(local_files_only = False):
pass
_get_statistics(None)
_get_statistics("repeat", force_download = False)
vram = torch.cuda.get_device_properties(0).total_memory / 1024 / 1024 / 1024
total_memory = torch.xpu.get_device_properties(0).total_memory if DEVICE_TYPE == "xpu" else torch.cuda.get_device_properties(0).total_memory
vram = total_memory / 1024 / 1024 / 1024
if vram <= 8 : vram = 8
elif vram <= 16: vram = 16
elif vram <= 20: vram = 20