diff --git a/invokeai/app/api/routers/model_records.py b/invokeai/app/api/routers/model_records.py index cffca25d9f..87d8211d12 100644 --- a/invokeai/app/api/routers/model_records.py +++ b/invokeai/app/api/routers/model_records.py @@ -141,7 +141,7 @@ async def del_model_record( status_code=201, ) async def add_model_record( - config: Annotated[AnyModelConfig, Body(description="Model config", discriminator="type")] + config: Annotated[AnyModelConfig, Body(description="Model config", discriminator="type")], ) -> AnyModelConfig: """ Add a model using the configuration information appropriate for its type. diff --git a/invokeai/backend/util/logging.py b/invokeai/backend/util/logging.py index 67419bf834..c607e91835 100644 --- a/invokeai/backend/util/logging.py +++ b/invokeai/backend/util/logging.py @@ -343,12 +343,12 @@ class InvokeAILogger(object): # noqa D102 ) -> logging.Logger: # noqa D102 if name in cls.loggers: return cls.loggers[name] - else: - logger = logging.getLogger(name) + + logger = logging.getLogger(name) logger.setLevel(config.log_level.upper()) # yes, strings work here for ch in cls.get_loggers(config): logger.addHandler(ch) - cls.loggers[name] = logger + cls.loggers[name] = logger return cls.loggers[name] @classmethod