/interrupt should allow specifying prompt_id
Open
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
The post `/interrupt` endpoint allows clearing the current running node. However, a race condition might result in it cancelling the wrong job. The `/interrupt` endpoint should take a `prompt_id` to ensure it will cancel the correct job only.
See `server.py`:
https://github.com/comfyanonymous/ComfyUI/blob/ee2c5fa72d4fc1714576fac7ba64aa5d607303d0/server.py#L507
```py
@routes.post("/interrupt")
async def post_interrupt(request):
nodes.interrupt_processing()
return web.Response(status=200)
```
Contributor guide
Assessment
This issue has not been assessed yet.