Comfy-Org / Comfy-Org/ComfyUI

RAM not being fully released after WAN 2.2 generation

Open
#9,484 12 comments 3 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

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

RAM should be fully empty besides the small amount comfyui keeps in reserve.

### Actual Behavior

I cannot disable custom nodes to see if this persists. I am using torchcompile and sagattention, however the issue persisted before that. Running pretty much any generation results (even after clearing node cache and releasing models) in circa 30gb RAM being reserved for no purpose. With each generation this memory leaked increases until ram is saturated and spills into swap.

### Steps to Reproduce

Run a wan 2.2 video generation.

### Debug Logs

```powershell
there are none
```

### Other

RTX 5090
64gb ram
100gb swap
swappiness 80
zram after swap

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.