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]}