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.

Fix Whisper auto_model mapping fallback for concrete model classes (#4115)

Daniel Han9248091500dd
diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py
index 1f6b240a7d8..5aea4712631 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"):