From 0a9d0d3e3ef7ba948014ba00b7dd18dc153f7b44 Mon Sep 17 00:00:00 2001 From: karrix Date: Tue, 22 Oct 2024 13:57:19 +0800 Subject: [PATCH] tweak --- custom_routes.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_routes.py b/custom_routes.py index 75127d6..02be070 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -1217,7 +1217,7 @@ async def send_json_override(self, event, data, sid=None): await update_run(prompt_id, Status.FAILED) # await update_run_with_output(prompt_id, data) - if event == "executed" and "node" in data and "std_output" in data: + if event == "executed" and "node" in data and "output" in data: node_meta = None if prompt_id in prompt_metadata: node = data.get("node") @@ -1231,7 +1231,7 @@ async def send_json_override(self, event, data, sid=None): # else: await update_run_with_output( prompt_id, - data.get("std_output"), + data.get("output"), node_id=data.get("node"), node_meta=node_meta, ) @@ -1765,7 +1765,10 @@ async def update_run_with_output( have_upload_media = False if data is not None: have_upload_media = ( - "images" in data or "files" in data or "gifs" in data or "mesh" in data + "images" in data + and isinstance(data.get("images"), list) + and len(data["images"]) > 0 + and data["images"][0].get("type") == "output" ) if bypass_upload and have_upload_media: print(