From 02eef72bf5d83aeee6d6919fc7a380fbe27a85bb Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Tue, 31 Dec 2024 11:27:09 +0300 Subject: [PATCH] fixed "verbose" argument (#6289) Signed-off-by: bigcat88 --- main.py | 4 +++- server.py | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 95972f73..c5c9f4e0 100644 --- a/main.py +++ b/main.py @@ -211,7 +211,9 @@ async def run(server_instance, address='', port=8188, verbose=True, call_on_star addresses = [] for addr in address.split(","): addresses.append((addr, port)) - await asyncio.gather(server_instance.start_multi_address(addresses, call_on_start), server_instance.publish_loop()) + await asyncio.gather( + server_instance.start_multi_address(addresses, call_on_start, verbose), server_instance.publish_loop() + ) def hijack_progress(server_instance): diff --git a/server.py b/server.py index 2dc53b9d..ceb5e83b 100644 --- a/server.py +++ b/server.py @@ -807,7 +807,7 @@ class PromptServer(): async def start(self, address, port, verbose=True, call_on_start=None): await self.start_multi_address([(address, port)], call_on_start=call_on_start) - async def start_multi_address(self, addresses, call_on_start=None): + async def start_multi_address(self, addresses, call_on_start=None, verbose=True): runner = web.AppRunner(self.app, access_log=None) await runner.setup() ssl_ctx = None @@ -818,7 +818,8 @@ class PromptServer(): keyfile=args.tls_keyfile) scheme = "https" - logging.info("Starting server\n") + if verbose: + logging.info("Starting server\n") for addr in addresses: address = addr[0] port = addr[1] @@ -834,7 +835,8 @@ class PromptServer(): else: address_print = address - logging.info("To see the GUI go to: {}://{}:{}".format(scheme, address_print, port)) + if verbose: + logging.info("To see the GUI go to: {}://{}:{}".format(scheme, address_print, port)) if call_on_start is not None: call_on_start(scheme, self.address, self.port)