Comfy-Org / Comfy-Org/ComfyUI

ComfyUI Desktop - ComfyUI and python processes do not shut down when closing the app

Open
#12,441 6 comments 2 reactions 0 assignees View on GitHub
Potential Bug
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

I expect program to properly close when I close it.

### Actual Behavior

After closing the window, all 5 ComfyUI.exe processes are still running and some ComfyUI python.exe processes too.

ComfyUI is still occupying the 9000 port. This has caused me pain since I restarted ComfyUI several times, but `localhost:9000` was still serving using old config version.

ComfyUI is still holding up files in .venv. This one actually broke my installation couple of times - the update process breaks in the middle as it cannot update the files.

### Steps to Reproduce

1. Install latest ComfyUI Desktop
2. Maybe use it
3. Close the window
4. Check the TaskManager for ComfyUI.exe and python.exe processes

### Debug Logs

```powershell
...
```

### Other

_No response_

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.