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 Hanaccb7b1ead70
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py
index 501ae227e0d..68b22135fc4 100644
--- a/unsloth/models/vision.py
+++ b/unsloth/models/vision.py
@@ -424,7 +424,7 @@ class FastBaseModel:
pass
# Fix AttributeError: 'BitsAndBytesConfig' object has no attribute 'get_loading_attributes'
- if not hasattr(bnb_config, "get_loading_attributes"):
+ if bnb_config is not None and not hasattr(bnb_config, "get_loading_attributes"):
bnb_config.get_loading_attributes = lambda *args, **kwargs: {}
# Cannot be None, since HF now checks for the config