Browse Source

Send back prompt number from prompt/ endpoint

pull/725/head
space-nuko 1 year ago
parent
commit
1bbd3f7fe1
  1. 2
      server.py

2
server.py

@ -361,7 +361,7 @@ class PromptServer():
prompt_id = str(uuid.uuid4()) prompt_id = str(uuid.uuid4())
outputs_to_execute = valid[2] outputs_to_execute = valid[2]
self.prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute)) self.prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute))
return web.json_response({"prompt_id": prompt_id}) return web.json_response({"prompt_id": prompt_id, "number": number})
else: else:
print("invalid prompt:", valid[1]) print("invalid prompt:", valid[1])
return web.json_response({"error": valid[1], "node_errors": valid[3]}, status=400) return web.json_response({"error": valid[1], "node_errors": valid[3]}, status=400)

Loading…
Cancel
Save