The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Make the prompt_id a uuid and return it when queueing the prompt.
comfyanonymous974958ff81d9
diff --git a/server.py b/server.pyindex 911f6a614..6965ff3c1 100644--- a/server.py+++ b/server.py@@ -81,7 +81,7 @@ class PromptServer():# Reusing existing session, remove oldself.sockets.pop(sid, None)else:- sid = uuid.uuid4().hex+ sid = uuid.uuid4().hexself.sockets[sid] = ws@@ -313,7 +313,9 @@ class PromptServer():if "client_id" in json_data:extra_data["client_id"] = json_data["client_id"]if valid[0]:- self.prompt_queue.put((number, id(prompt), prompt, extra_data, valid[2]))+ prompt_id = str(uuid.uuid4())+ self.prompt_queue.put((number, prompt_id, prompt, extra_data, valid[2]))+ return web.json_response({"prompt_id": prompt_id})else:resp_code = 400out_string = valid[1]