BallonsTranslator icon indicating copy to clipboard operation
BallonsTranslator copied to clipboard

RAM Usage

Open rspreet92 opened this issue 3 years ago • 5 comments

Can we do something about RAM usage ? It's more than Chrome (with 15 tabs open)

image

rspreet92 avatar Nov 13 '22 11:11 rspreet92

I think not, because Python brings a bunch of its libraries into RAM to work with.

bropines avatar Nov 13 '22 11:11 bropines

it's mainly pytorch

dmMaze avatar Nov 13 '22 12:11 dmMaze

I don't mind when it's running (doing ocr, translation, inpainting etc.) but this much RAM usage is when it's idle.

rspreet92 avatar Nov 13 '22 13:11 rspreet92

I don't mind when it's running (doing ocr, translation, inpainting etc.) but this much RAM usage is when it's idle.

As far as I remember, this can be fixed using pytorch methods, but for this you will have to rewrite all current DL algorithms.

bropines avatar Nov 13 '22 14:11 bropines

I don't mind when it's running (doing ocr, translation, inpainting etc.) but this much RAM usage is when it's idle.

large portion of allocated memory are reserved and managed by pytorch, you can see memory consumption on startup up vs after running inpainting:

image image

As far as I know, pytorch doesn't provide an easy way to deallocate these: https://github.com/pytorch/pytorch/issues/68114 https://discuss.pytorch.org/t/how-to-clear-cpu-memory-after-training-no-cuda/107990

dmMaze avatar Nov 14 '22 02:11 dmMaze