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.

Update loader.py

Daniel Han4824e1706350
diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py
index 44475780aff..e3fab290a0f 100644
--- a/unsloth/models/loader.py
+++ b/unsloth/models/loader.py
@@ -460,7 +460,7 @@ class FastModel(FastBaseModel):
*args, **kwargs,
):
if token is None: token = get_token()
- assert (dtype is None or dtype == torch.float16 or dtype == torch.bfloat16)
+ assert (dtype is None or dtype in (torch.float16, torch.bfloat16, torch.float32))
patch_compiled_autograd()
patch_compiling_bitsandbytes()