diffusers
diffusers copied to clipboard
stable diffusion machine memory leak
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:

runing log:

Hey @wen020,
Would you like to open a PR to fix the memory leak? :-)
@patrickvonplaten I have no idea about this problem.Can you give me some suggestions?And do you have a plan to solve this problem?
Those issue could maybe help:
https://github.com/huggingface/diffusers/issues/1905 https://github.com/huggingface/diffusers/issues/2053
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.