From 1741ad55acf851bc85ff2a63e95f9af913b735ad Mon Sep 17 00:00:00 2001 From: bigcat88 Date: Tue, 24 Dec 2024 18:54:43 +0200 Subject: [PATCH] added ability to specify custom "prompt_id" Signed-off-by: bigcat88 --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index dfee6887..90fafac8 100644 --- a/server.py +++ b/server.py @@ -686,7 +686,10 @@ class PromptServer(): if "client_id" in json_data: extra_data["client_id"] = json_data["client_id"] if valid[0]: - prompt_id = str(uuid.uuid4()) + if "prompt_id" in json_data: + prompt_id = json_data["prompt_id"] + else: + prompt_id = str(uuid.uuid4()) outputs_to_execute = valid[2] self.prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute)) return {"prompt_id": prompt_id, "number": number, "node_errors": valid[3]}