mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 07:03:37 +00:00
Fix crash when no model is selected (None passed to resolve_model_path)
This commit is contained in:
parent
000d776967
commit
66d1a22c73
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue