From a7d453175ae7a00e8082d3598283686e04a76c3d Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sat, 4 Jul 2026 13:37:55 +0000 Subject: [PATCH] Normalize model_types in fla install advisory for None and single string --- unsloth/models/loader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index d60a3f02bd..cd4c13aff5 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -223,6 +223,10 @@ def _maybe_advise_fla_install(model_types): global _fla_advised if _fla_advised: return + if model_types is None: + return + if isinstance(model_types, str): + model_types = [model_types] # a lone string would otherwise iterate chars try: if not any( isinstance(t, str) and t.startswith(FLA_MODEL_TYPE_PREFIXES) for t in model_types