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:
parent
2755fd1af0
commit
95e44c20d6
1 changed files with 1 additions and 1 deletions
|
|
@ -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.'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue