diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

stable diffusion machine memory leak

Open wen020 opened this issue 2 years ago • 3 comments

I have encountered a memory leak problem, we need to store and switch the model of stable diffusion in memory, but when we convert the model in memory to gpu, the memory is not reclaimed, and at the same time, when the model in memory is deleted, the memory also not recycled. Therefore, what should I do to reclaim the machine memory occupied by the stable diffusion model.

code: 51739229-1161-4286-9FEB-728C4EA7E976.png

runing log: FF8085CC-A11A-48C3-94ED-1F5BE84AF27A.png

wen020 avatar Feb 08 '23 08:02 wen020

Hey @wen020,

Would you like to open a PR to fix the memory leak? :-)

patrickvonplaten avatar Feb 09 '23 09:02 patrickvonplaten

@patrickvonplaten I have no idea about this problem.Can you give me some suggestions?And do you have a plan to solve this problem?

wen020 avatar Feb 14 '23 01:02 wen020

Those issue could maybe help:

https://github.com/huggingface/diffusers/issues/1905 https://github.com/huggingface/diffusers/issues/2053

patrickvonplaten avatar Feb 14 '23 21:02 patrickvonplaten

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Mar 11 '23 15:03 github-actions[bot]