0.0.0.0 doesn't work on windows.

This commit is contained in:
comfyanonymous 2023-08-01 01:14:17 -04:00
parent 076d2db60f
commit eb5191f911
1 changed files with 2 additions and 0 deletions

View File

@ -160,6 +160,8 @@ if __name__ == "__main__":
if args.auto_launch:
def startup_server(address, port):
import webbrowser
if os.name == 'nt' and address == '0.0.0.0':
address = '127.0.0.1'
webbrowser.open(f"http://{address}:{port}")
call_on_start = startup_server