Comfy-Org / Comfy-Org/ComfyUI

Slow RAM release. Also no RAM releasing when it's necessary.

Open
#2,067 2 comments 6 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

First, look at RAM usage graph:
![изображение](https://github.com/comfyanonymous/ComfyUI/assets/55319814/0e00077f-8667-4e7d-a152-603f63e964cf)

It's 24GB RAM + 16GB Page file during SDXL model loading and run in lowvram mode. There is no any RAM activities between red dots in about 1minute of time, but as you can see RAM is slowly released. Is it possible to do it immediately?

Another thing is that it's impossible to change SDXL model with this amount of RAM. When I trying to load another model I have out of memory error (RAM). It looks like, even if I have limited amount of RAM, ComfyUI will not release RAM from old loaded model, which is no longer relevant. Or maybe problem is only in slow RAM release - memory is releasing but not as fast as it's allocation works.

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.