Fix crash when no model is selected (None passed to resolve_model_path)

This commit is contained in:
oobabooga 2026-04-03 05:56:36 -07:00
parent 000d776967
commit 66d1a22c73

View file

@ -105,6 +105,9 @@ def resolve_model_path(model_name_or_path, image_model=False):
before the default models directory.
"""
if model_name_or_path is None:
raise FileNotFoundError("No model specified.")
path_candidate = Path(model_name_or_path)
if path_candidate.exists():
return path_candidate