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.

Bug fix

Daniel Han9edbe2325958
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index cd8dd6d0dea..cef886e9a48 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "2025.4.6"
+__version__ = "2025.4.7"
__all__ = [
"SUPPORTS_BFLOAT16",
diff --git a/unsloth/models/loader_utils.py b/unsloth/models/loader_utils.py
index 49baae55dfb..db81b5c5c69 100644
--- a/unsloth/models/loader_utils.py
+++ b/unsloth/models/loader_utils.py
@@ -110,7 +110,8 @@ def get_model_name(model_name, load_in_4bit = True):
)
# In the rare case, we convert bad model names to other names
# For eg too large dynamic quants or MoEs
- if new_model_name.lower() in BAD_MAPPINGS:
+ if new_model_name is not None and type(new_model_name) is str and \
+ new_model_name.lower() in BAD_MAPPINGS:
new_model_name = BAD_MAPPINGS[new_model_name.lower()]
if new_model_name is None and model_name.count("/") == 1 and model_name[0].isalnum():