Closed nono909090 closed 2 months ago
you don't have to do anything special, you can use None
or del
, just need to make sure you don't have reference to it or the models anywhere else.
If you don't see the memory freed, you can force it with this:
torch.cuda.empty_cache()
you don't have to do anything special, you can use
None
ordel
, just need to make sure you don't have reference to it or the models anywhere else.If you don't see the memory freed, you can force it with this:
torch.cuda.empty_cache()
yes,it works! thank you
glad it worked, closing this issue now then.
how to unload a pipeline and release the gpu memory