vt-vl-lab / 3d-photo-inpainting

[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting
https://shihmengli.github.io/3D-Photo-Inpainting/
Other
6.9k stars 1.11k forks source link

gpu memory Leak #142

Closed crasse2 closed 2 years ago

crasse2 commented 2 years ago

Hi There !

just realised that while running the output_3D_photo function in a loop ( for example n times within a notebook without resetting the kernel) produce a GPU memory leak of around 100 MB each times (and it lead to OOM error of course after several loops, depending on the GPU used) Do you happen to know what are those 100 MB that got stacked somewhere each time ?

found out the leak is produced by the command : img = normal_canvas.render()

still trying to find a way to clean memory after this command, if somebody has any clue, apparently it stores data permanently in the GPU memory and unless I reset the kernel, it get stacked and not re-used like it should

edit : problem resolved, got to change vispy backend to PyQt5

zhanpengxin commented 2 years ago

Thanks for your issue and solution. It helps me a lot

Rangang01 commented 7 months ago

@crasse2 @zhanpengxin Sorry interrupt,could you please explain "edit : problem resolved, got to change vispy backend to PyQt5",I am also encountering the same problem.Thank you very much!

zhanpengxin commented 7 months ago

你好,我已收到你的邮件,我会及时处理^_^

crasse2 commented 7 months ago

@Rangang01 Hi ! see my exchange on this matter here : https://github.com/vispy/vispy/issues/2272

have a good day