mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix incorrect use of a singleton list.
This was found through pylance type errors. Go types!
This commit is contained in:
parent
00d3cd4aed
commit
07a90c0198
@ -298,7 +298,7 @@ async def search_for_models(
|
||||
)->List[pathlib.Path]:
|
||||
if not search_path.is_dir():
|
||||
raise HTTPException(status_code=404, detail=f"The search path '{search_path}' does not exist or is not directory")
|
||||
return ApiDependencies.invoker.services.model_manager.search_for_models([search_path])
|
||||
return ApiDependencies.invoker.services.model_manager.search_for_models(search_path)
|
||||
|
||||
@models_router.get(
|
||||
"/ckpt_confs",
|
||||
|
@ -600,7 +600,7 @@ class ModelManagerService(ModelManagerServiceBase):
|
||||
"""
|
||||
Return list of all models found in the designated directory.
|
||||
"""
|
||||
search = FindModels(directory,self.logger)
|
||||
search = FindModels([directory], self.logger)
|
||||
return search.list_models()
|
||||
|
||||
def sync_to_config(self):
|
||||
|
@ -98,6 +98,6 @@ class FindModels(ModelSearch):
|
||||
|
||||
def list_models(self) -> List[Path]:
|
||||
self.search()
|
||||
return self.models_found
|
||||
return list(self.models_found)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user