Normalize model_types in fla install advisory for None and single string

This commit is contained in:
Daniel Han 2026-07-04 13:37:55 +00:00 committed by danielhanchen
commit a7d453175a

View file

@ -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