mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
Model: Fix load if model didn't load properly
If the model didn't load properly, the container still exists until unload is called. However, the name check still registered as true. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -33,7 +33,7 @@ async def load_model_gen(model_path: pathlib.Path, **kwargs):
|
||||
if container and container.model:
|
||||
loaded_model_name = container.get_model_path().name
|
||||
|
||||
if loaded_model_name == model_path.name:
|
||||
if loaded_model_name == model_path.name and container.model_loaded:
|
||||
raise ValueError(
|
||||
f'Model "{loaded_model_name}" is already loaded! Aborting.'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user