Browse Source

Make the prompt_id a uuid and return it when queueing the prompt.

pull/652/head
comfyanonymous 2 years ago
parent
commit
974958ff81
  1. 4
      server.py

4
server.py

@ -313,7 +313,9 @@ class PromptServer():
if "client_id" in json_data: if "client_id" in json_data:
extra_data["client_id"] = json_data["client_id"] extra_data["client_id"] = json_data["client_id"]
if valid[0]: 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: else:
resp_code = 400 resp_code = 400
out_string = valid[1] out_string = valid[1]

Loading…
Cancel
Save