diff --git a/invokeai/app/api/routers/models.py b/invokeai/app/api/routers/models.py index cb0832735b..a7b1f81252 100644 --- a/invokeai/app/api/routers/models.py +++ b/invokeai/app/api/routers/models.py @@ -152,7 +152,7 @@ async def import_model( ) -> ImportModelResponse: """Add a model using its local path, repo_id, or remote URL. Model characteristics will be probed and configured automatically""" - location = location.strip() + location = location.strip("\"' ") items_to_import = {location} prediction_types = {x.value: x for x in SchedulerPredictionType} logger = ApiDependencies.invoker.services.logger diff --git a/invokeai/backend/install/model_install_backend.py b/invokeai/backend/install/model_install_backend.py index bd26a7aa07..9224f5c8b2 100644 --- a/invokeai/backend/install/model_install_backend.py +++ b/invokeai/backend/install/model_install_backend.py @@ -236,7 +236,7 @@ class ModelInstall(object): if not models_installed: models_installed = dict() - model_path_id_or_url = str(model_path_id_or_url).strip() + model_path_id_or_url = str(model_path_id_or_url).strip("\"' ") # A little hack to allow nested routines to retrieve info on the requested ID self.current_id = model_path_id_or_url