lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
7.88k stars 760 forks source link

Forge keeps using more and more RAM after api generations. #2017

Open paulleem opened 1 day ago

paulleem commented 1 day ago

Hi, I now use the webui forge for some iterative generating purposes. I have a lot of model loading/unloading tasks in forge, including LoRAs and ControlNets.

The thing is, whenever I keep going through the generation process, the RAM usage keeps increasing, as if the cached model is not being purged in RAM. It discretely spikes especially when the ControlNet model is loaded. (I use different ControlNet models for iteration)

I now use 4 4090 GPUs. One generation process uses approx 15000MB in a single GPU. My memory starts in 73GB, ending up overflowing 188GB, which is the device limit.

Any help? Thanks.

aled93 commented 11 hours ago

Same. One of commit starting from dc4f5e4119962507be66d60b9a087d27791c093e to latest did that (I merging every time and in my previous session this didn't happened)