From 937057216923eaa585ee6d754abaeb5a462f721a Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 20 Jul 2023 22:45:35 -0400 Subject: [PATCH] prettify startup messages --- invokeai/app/api/dependencies.py | 3 ++- invokeai/app/services/config.py | 2 +- invokeai/app/services/model_manager_service.py | 5 +++-- invokeai/backend/model_management/model_manager.py | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/invokeai/app/api/dependencies.py b/invokeai/app/api/dependencies.py index 555c60a383..050d1b091f 100644 --- a/invokeai/app/api/dependencies.py +++ b/invokeai/app/api/dependencies.py @@ -58,7 +58,8 @@ class ApiDependencies: @staticmethod def initialize(config: InvokeAIAppConfig, event_handler_id: int, logger: Logger = logger): - logger.debug(f"InvokeAI version {__version__}") + logger.info(f"InvokeAI version {__version__}") + logger.info(f"Root directory = {str(config.root_path)}") logger.debug(f"Internet connectivity is {config.internet_available}") events = FastAPIEventService(event_handler_id) diff --git a/invokeai/app/services/config.py b/invokeai/app/services/config.py index ba56bbdb7e..b1e4e7ed5d 100644 --- a/invokeai/app/services/config.py +++ b/invokeai/app/services/config.py @@ -397,7 +397,7 @@ setting environment variables INVOKEAI_. log_handlers : List[str] = Field(default=["console"], description='Log handler. Valid options are "console", "file=", "syslog=path|address:host:port", "http="', category="Logging") # note - would be better to read the log_format values from logging.py, but this creates circular dependencies issues log_format : Literal[tuple(['plain','color','syslog','legacy'])] = Field(default="color", description='Log format. Use "plain" for text-only, "color" for colorized output, "legacy" for 2.3-style logging and "syslog" for syslog-style', category="Logging") - log_level : Literal[tuple(["debug","info","warning","error","critical"])] = Field(default="debug", description="Emit logging messages at this level or higher", category="Logging") + log_level : Literal[tuple(["debug","info","warning","error","critical"])] = Field(default="info", description="Emit logging messages at this level or higher", category="Logging") version : bool = Field(default=False, description="Show InvokeAI version and exit", category="Other") #fmt: on diff --git a/invokeai/app/services/model_manager_service.py b/invokeai/app/services/model_manager_service.py index 37a497aa5d..b1b995309e 100644 --- a/invokeai/app/services/model_manager_service.py +++ b/invokeai/app/services/model_manager_service.py @@ -299,10 +299,11 @@ class ModelManagerService(ModelManagerServiceBase): else: config_file = config.root_dir / "configs/models.yaml" - logger.debug(f'config file={config_file}') + logger.debug(f'Config file={config_file}') device = torch.device(choose_torch_device()) - logger.debug(f'GPU device = {device}') + device_name = torch.cuda.get_device_name() if device==torch.device('cuda') else '' + logger.info(f'GPU device = {device} {device_name}') precision = config.precision if precision == "auto": diff --git a/invokeai/backend/model_management/model_manager.py b/invokeai/backend/model_management/model_manager.py index e9baa5ca67..5be1bcb332 100644 --- a/invokeai/backend/model_management/model_manager.py +++ b/invokeai/backend/model_management/model_manager.py @@ -858,7 +858,7 @@ class ModelManager(object): loaded_files = set() new_models_found = False - self.logger.info(f'scanning {self.app_config.models_path} for new models') + self.logger.info(f'Scanning {self.app_config.models_path} for new models') with Chdir(self.app_config.root_path): for model_key, model_config in list(self.models.items()): model_name, cur_base_model, cur_model_type = self.parse_key(model_key)