mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-02 15:04:50 +08:00
Merge branch 'master' into save-images
This commit is contained in:
@@ -113,7 +113,7 @@ class PromptServer():
|
||||
async def view_image(request):
|
||||
if "file" in request.rel_url.query:
|
||||
type = request.rel_url.query.get("type", "output")
|
||||
if type != "output" and type != "input":
|
||||
if type not in ["output", "input", "temp"]:
|
||||
return web.Response(status=400)
|
||||
|
||||
output_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), type)
|
||||
@@ -267,7 +267,7 @@ class PromptServer():
|
||||
msg = await self.messages.get()
|
||||
await self.send(*msg)
|
||||
|
||||
async def start(self, address, port, verbose=True):
|
||||
async def start(self, address, port, verbose=True, call_on_start=None):
|
||||
runner = web.AppRunner(self.app)
|
||||
await runner.setup()
|
||||
site = web.TCPSite(runner, address, port)
|
||||
@@ -278,3 +278,6 @@ class PromptServer():
|
||||
if verbose:
|
||||
print("Starting server\n")
|
||||
print("To see the GUI go to: http://{}:{}".format(address, port))
|
||||
if call_on_start is not None:
|
||||
call_on_start(address, port)
|
||||
|
||||
|
Reference in New Issue
Block a user