From 921ccad04d2b903617cd4dd6d15c4f7fa8fe9c66 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Wed, 2 Aug 2023 18:41:43 -0400 Subject: [PATCH] added stats service to the cli_app startup --- invokeai/app/cli_app.py | 2 ++ scripts/dream.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/invokeai/app/cli_app.py b/invokeai/app/cli_app.py index bad95bb559..4558c9219f 100644 --- a/invokeai/app/cli_app.py +++ b/invokeai/app/cli_app.py @@ -37,6 +37,7 @@ from invokeai.app.services.image_record_storage import SqliteImageRecordStorage from invokeai.app.services.images import ImageService, ImageServiceDependencies from invokeai.app.services.resource_name import SimpleNameService from invokeai.app.services.urls import LocalUrlService +from invokeai.app.services.invocation_stats import InvocationStatsService from .services.default_graphs import default_text_to_image_graph_id, create_system_graphs from .services.latent_storage import DiskLatentsStorage, ForwardCacheLatentsStorage @@ -311,6 +312,7 @@ def invoke_cli(): graph_library=SqliteItemStorage[LibraryGraph](filename=db_location, table_name="graphs"), graph_execution_manager=graph_execution_manager, processor=DefaultInvocationProcessor(), + performance_statistics=InvocationStatsService(graph_execution_manager), logger=logger, configuration=config, ) diff --git a/scripts/dream.py b/scripts/dream.py index 12176db41e..d2735046a4 100755 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -2,10 +2,12 @@ # Copyright (c) 2022 Lincoln D. Stein (https://github.com/lstein) import warnings -from invokeai.frontend.CLI import invokeai_command_line_interface as main warnings.warn( "dream.py is being deprecated, please run invoke.py for the " "new UI/API or legacy_api.py for the old API", DeprecationWarning, ) -main() + +from invokeai.app.cli_app import invoke_cli + +invoke_cli()