Comfy-Org / Comfy-Org/ComfyUI

/interrupt should allow specifying prompt_id

Open
#2,566 0 comments 5 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.