Comfy-Org / Comfy-Org/ComfyUI

ComfyUI doesn't release memory.

Open
#9,408 6 comments 3 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

- [ ] 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

OOM (system RAM) after a few times of model switching, even pressing Unload model doesn't release memory.

### Actual Behavior

Switching models does not release system memory (only with the 1-2 latest updates, I think), and after 2-3 times of switching, Comfy crashes. Older versions do not have this problem. Btw, I have 64GB of RAM and 12GB of VRAM.

### Steps to Reproduce

Just switching from one model to other a few times until system runs out of memory.

### Debug Logs

```powershell
No log, Comfy just silently crashes.
```

### 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.