From 972d1bb659479ef86407e4140c2a1d869a9aed6e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 7 Aug 2025 07:10:36 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 501ae227e0..68b22135fc 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