Closed gsotnikov closed 2 years ago
thanks for yoru interest.
lowmem
has been induced when struggling with high resolution rendering for some project, and definitely helped to win some decent amount of pixels for inference/processing. i remember, that was surprise for me as well, but i just tried every possibility then, and this move suddenly worked. thus, i decided to keep it like that.
unfortunately, that was while ago, and i don't have any exact numbers about that.
you may try youself; just in case, here's a debugging snippet i used back then (replacing vars
as needed):
def cudamem(): return int(torch.cuda.memory_allocated() / (1024*1024))
def cudacache(): return int(torch.cuda.memory_cached() / (1024*1024))
mem_, cache_ = cudamem(), cudacache()
del vars; torch.cuda.empty_cache()
print(' clean mem', mem_, cache_, '=>', cudamem(), cudacache())
Thanks, I will figure it out!
Thank you for your interesting comments, I find them very meaningfull.
Can you please clarify what exactly are you trying to achieve by lowmem parameter as from my perspective it just removes a style vector (matrix ~ [Bs x StyleDim]), which is pretty lightweight.
It would be interesting to hear some numbers (like gpu mem savings), how it helps.
Thanks!👍🏻