From 9248091500ddd8e351f3a445e0f9dff3b649f26a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 26 Feb 2026 23:43:57 -0800 Subject: [PATCH] Fix Whisper auto_model mapping fallback for concrete model classes (#4115) --- unsloth/models/vision.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 1f6b240a7d..5aea471263 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -627,8 +627,8 @@ class FastBaseModel: # Re-resolve model_class after potential config change try: model_class = auto_model._model_mapping[auto_config.__class__] - except KeyError: - pass + except Exception: + model_class = None model_type = str(getattr(auto_config, "model_type", "")).lower() if model_type.startswith("gemma3n"):