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 vision.py

Daniel Hancb4579c19954
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py
index 31733c2976b..1404be8b0fb 100644
--- a/unsloth/models/vision.py
+++ b/unsloth/models/vision.py
@@ -485,7 +485,7 @@ class FastBaseModel:
full_finetuning = os.environ.get("UNSLOTH_ENABLE_FULL_FINETUNING", "0") == "1"
float32_mixed_precision = True
- if _get_dtype(model.config.torch_dtype) == torch.bfloat16:
+ if _get_dtype(model.config.torch_dtype) == torch.bfloat16 and full_finetuning:
# Use bfloat16 precision for full finetuning
float32_mixed_precision = False