From 1f18221e173b9acc98df38526959af990b1794ba Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Tue, 7 Feb 2023 21:57:17 -0500 Subject: [PATCH] Add --port to set custom port. --- main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index a242d52c..092df660 100644 --- a/main.py +++ b/main.py @@ -449,6 +449,14 @@ if __name__ == "__main__": address = '0.0.0.0' else: address = '127.0.0.1' - run(q, address=address, port=8188) + + port = 8188 + try: + p_index = sys.argv.index('--port') + port = int(sys.argv[p_index + 1]) + except: + pass + + run(q, address=address, port=port)