Skip to content

Commit d487225

Browse files
committed
Update doc string for import_local_model and remove access_token since it's only usable for local file paths
1 parent e680cf7 commit d487225

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

invokeai/app/services/shared/invocation_context.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,17 +468,24 @@ def import_local_model(
468468
self,
469469
model_path: Path,
470470
config: Optional[ModelRecordChanges] = None,
471-
access_token: Optional[str] = None,
472471
inplace: Optional[bool] = False,
473472
):
474473
"""
475-
TODO: Fill out description of this method
474+
Import the model file located at the given local file path and return its ModelInstallJob.
475+
476+
This can be used to single-file models or directories.
477+
478+
Args:
479+
model_path: A pathlib.Path object pointing to a model file or directory
480+
config: Optional ModelRecordChanges to define manual probe overrides
481+
inplace: Optional boolean to declare whether or not to install the model in the models dir
482+
483+
Returns:
484+
ModelInstallJob object defining the install job to be used in tracking the job
476485
"""
477486
if not model_path.exists():
478487
raise Exception("Models provided to import_local_model must already exist on disk")
479-
return self._services.model_manager.install.heuristic_import(
480-
str(model_path), config=config, access_token=access_token, inplace=inplace
481-
)
488+
return self._services.model_manager.install.heuristic_import(str(model_path), config=config, inplace=inplace)
482489

483490
def load_local_model(
484491
self,

0 commit comments

Comments
 (0)