Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

fix for intel memory (#3513)

Lei Zhenyuan57a03c35f431
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index deaaec26ae7..65492808983 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -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