From 509514f11d41054132753d9561831917351e6342 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 13 Jul 2023 21:42:26 +1000 Subject: [PATCH] feat(api): display warning when port is in use --- invokeai/app/api_app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/invokeai/app/api_app.py b/invokeai/app/api_app.py index fa4643d934..824b697d54 100644 --- a/invokeai/app/api_app.py +++ b/invokeai/app/api_app.py @@ -205,6 +205,8 @@ def invoke_api(): return port port = find_port(app_config.port) + if port != app_config.port: + logger.warn(f"Port {app_config.port} in use, using port {port}") # Start our own event loop for eventing usage loop = asyncio.new_event_loop() config = uvicorn.Config(app=app, host=app_config.host, port=port, loop=loop)