mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-25 07:52:15 +08:00
add: open webbrowser when server got started
This commit is contained in:
parent
88aee596a3
commit
b51bfaf4e8
@ -21,6 +21,7 @@ from io import BytesIO
|
|||||||
import aiohttp
|
import aiohttp
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
import logging
|
import logging
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
import mimetypes
|
import mimetypes
|
||||||
from comfy.cli_args import args
|
from comfy.cli_args import args
|
||||||
@ -943,6 +944,7 @@ class PromptServer():
|
|||||||
port = addr[1]
|
port = addr[1]
|
||||||
site = web.TCPSite(runner, address, port, ssl_context=ssl_ctx)
|
site = web.TCPSite(runner, address, port, ssl_context=ssl_ctx)
|
||||||
await site.start()
|
await site.start()
|
||||||
|
webbrowser.open(f"{scheme}://{address}:{port}")
|
||||||
|
|
||||||
if not hasattr(self, 'address'):
|
if not hasattr(self, 'address'):
|
||||||
self.address = address #TODO: remove this
|
self.address = address #TODO: remove this
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user