mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-27 09:41:54 +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:
|
if container and container.model:
|
||||||
loaded_model_name = container.get_model_path().name
|
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(
|
raise ValueError(
|
||||||
f'Model "{loaded_model_name}" is already loaded! Aborting.'
|
f'Model "{loaded_model_name}" is already loaded! Aborting.'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user