152334H / tortoise-tts-fast

Fast TorToiSe inference (5x or your money back!)
GNU Affero General Public License v3.0
771 stars 179 forks source link

streamlit memleak #30

Open 152334H opened 1 year ago

152334H commented 1 year ago

There's a memory leak somewhere, my computer with 32GB of RAM has ended up dying from swap thrashing twice now.

152334H commented 1 year ago

@Ryu1845 do you have any idea what is going on? I tried both using caching && running gc.collect() but my memory still keeps going up whenever I change model

Ryu1845 commented 1 year ago

No, I don't. I'll look into it

Ryu1845 commented 1 year ago

Something came up, I'll only be able to look further in about 8h

Ryu1845 commented 1 year ago

https://blog.streamlit.io/3-steps-to-fix-app-memory-leaks/

152334H commented 1 year ago

Realistically I know it's triggering model loading repeatedly somehow, because the memory jumps are very big and correspond to load_model() calls

I just have no idea why the memory continually leaks and stacks up, even with a cache size of 1 + gc.collect