ComfyUI completes a workflow but does not terminate properly
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
A workflow should run and when the output is complete, ComfyUI should terminate properly and allow subsequent runs of same or another workflow.
No custom nodes, fresh install and deleted all previous folders to make sure. Using this template as example: video_wan2_5B_ti2v from comfyuis template section.
### Actual Behavior
ComfyUI does NOT terminate the workflow correctly. The status is "running" indefinitely and never ends, and when user attempts to cancel the running job in any way, there is no response and infinitely continues to run.
### Steps to Reproduce
Use any workflow.
### Debug Logs
```powershell
Requested to load WAN22
loaded partially; 7257.62 MB usable, 7195.64 MB loaded, 2340.76 MB offloaded, 54.02 MB buffer reserved, lowvram patches: 0
100%|██████████| 20/20 [07:35<00:00, 22.78s/it]
Requested to load WanVAE
0 models unloaded.
loaded partially; 0.00 MB usable, 0.00 MB loaded, 1344.02 MB offloaded, 162.01 MB buffer reserved, lowvram patches: 0
Exception in thread Thread-12 (prompt_worker):
Traceback (most recent call last):
File "C:\Users\Dave\AppData\Roaming\uv\python\cpython-3.12.11-windows-x86_64-none\Lib\threading.py", line 1075, in _bootstrap_inner
self.run()
File "C:\Users\Dave\AppData\Roaming\uv\python\cpython-3.12.11-windows-x86_64-none\Lib\threading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Dave\AppData\Local\Programs\ComfyUI\resources\ComfyUI\main.py", line 234, in prompt_worker
q.task_done(item_id,
TypeError: new_task_done() got an unexpected keyword argument 'process_item'
Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle:
Traceback (most recent call last):
File "C:\Users\Dave\AppData\Roaming\uv\python\cpython-3.12.11-windows-x86_64-none\Lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Dave\AppData\Roaming\uv\python\cpython-3.12.11-windows-x86_64-none\Lib\asyncio\proactor_events.py", line 165, in _call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Interrupting prompt 0c0a7602-f9f1-42a9-a076-f4d9f3d55513
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.