From 1c9c32e9e4ebbedb766eb609ac6b8dd8d3652634 Mon Sep 17 00:00:00 2001 From: bennykok Date: Sun, 25 Feb 2024 23:52:09 -0800 Subject: [PATCH] fix(plugin): client id wrongly set causing not sending out ws event --- custom_routes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_routes.py b/custom_routes.py index 7818280..399d695 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -143,7 +143,7 @@ def send_prompt(sid: str, inputs: StreamingPrompt): prompt = { "prompt": workflow_api, - "client_id": "comfy_deploy_instance", #api.client_id + "client_id": sid, #"comfy_deploy_instance", #api.client_id "prompt_id": prompt_id } @@ -491,10 +491,14 @@ send_json = prompt_server.send_json async def send_json_override(self, event, data, sid=None): # print("INTERNAL:", event, data, sid) prompt_id = data.get('prompt_id') + + target_sid = sid + if target_sid == "comfy_deploy_instance": + target_sid = None # now we send everything await asyncio.wait([ - asyncio.create_task(send(event, data, sid=sid)), + asyncio.create_task(send(event, data, sid=target_sid)), asyncio.create_task(self.send_json_original(event, data, sid)) ])