diff --git a/docs/installation/010_INSTALL_AUTOMATED.md b/docs/installation/010_INSTALL_AUTOMATED.md index 8072364b55..fc9d64ba01 100644 --- a/docs/installation/010_INSTALL_AUTOMATED.md +++ b/docs/installation/010_INSTALL_AUTOMATED.md @@ -40,10 +40,8 @@ experimental versions later. this, open up a command-line window ("Terminal" on Linux and Macintosh, "Command" or "Powershell" on Windows) and type `python --version`. If Python is installed, it will print out the version - number. If it is version `3.9.*` or `3.10.*`, you meet - requirements. We do not recommend using Python 3.11 or higher, - as not all the libraries that InvokeAI depends on work properly - with this version. + number. If it is version `3.9.*`, `3.10.*` or `3.11.*` you meet + requirements. !!! warning "What to do if you have an unsupported version" diff --git a/invokeai/app/api/routers/models.py b/invokeai/app/api/routers/models.py index 759f6c9f59..a7e0616f5b 100644 --- a/invokeai/app/api/routers/models.py +++ b/invokeai/app/api/routers/models.py @@ -87,7 +87,7 @@ async def update_model( new_name = info.model_name, new_base = info.base_model, ) - logger.info(f'Successfully renamed {base_model}/{model_name}=>{info.base_model}/{info.model_name}') + logger.info(f'Successfully renamed {base_model.value}/{model_name}=>{info.base_model}/{info.model_name}') # update information to support an update of attributes model_name = info.model_name base_model = info.base_model @@ -98,7 +98,7 @@ async def update_model( ) if new_info.get('path') != previous_info.get('path'): # model manager moved model path during rename - don't overwrite it info.path = new_info.get('path') - + ApiDependencies.invoker.services.model_manager.update_model( model_name=model_name, base_model=base_model, diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index 098258153e..1299ba9200 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -391,6 +391,10 @@ class ModelManager(object): base_model: BaseModelType, model_type: ModelType, ) -> str: + # In 3.11, the behavior of (str,enum) when interpolated into a + # string has changed. The next two lines are defensive. + base_model = BaseModelType(base_model) + model_type = ModelType(model_type) return f"{base_model.value}/{model_type.value}/{model_name}" @classmethod diff --git a/scripts/probe-model.py b/scripts/probe-model.py new file mode 100755 index 0000000000..eca2a0985a --- /dev/null +++ b/scripts/probe-model.py @@ -0,0 +1,19 @@ +#!/bin/env python + +import argparse +import sys +from pathlib import Path +from invokeai.backend.model_management.model_probe import ModelProbe + +parser = argparse.ArgumentParser(description="Probe model type") +parser.add_argument( + 'model_path', + type=Path, +) +args=parser.parse_args() + +info = ModelProbe().probe(args.model_path) +print(info) + + +