(prompt)
| 96 | """ |
| 97 | |
| 98 | def queue_prompt(prompt): |
| 99 | p = {"prompt": prompt} |
| 100 | |
| 101 | # If the workflow contains API nodes, you can add a Comfy API key to the `extra_data`` field of the payload. |
| 102 | # p["extra_data"] = { |
| 103 | # "api_key_comfy_org": "comfyui-87d01e28d*******************************************************" # replace with real key |
| 104 | # } |
| 105 | # See: https://docs.comfy.org/tutorials/api-nodes/overview |
| 106 | # Generate a key here: https://platform.comfy.org/login |
| 107 | |
| 108 | data = json.dumps(p).encode('utf-8') |
| 109 | req = request.Request("http://127.0.0.1:8188/prompt", data=data) |
| 110 | request.urlopen(req) |
| 111 | |
| 112 | |
| 113 | prompt = json.loads(prompt_text) |
no test coverage detected