instruct-pix2pix icon indicating copy to clipboard operation
instruct-pix2pix copied to clipboard

Cuda out of memory with 24GB VRAM

Open giuseppecartella opened this issue 1 year ago • 1 comments

Hi!.

I made a script to generate images starting from a list of PIL images, following the edit_cli.py file. However, after a few generated images I get the "cuda out of memory" error. It seems that the memory keeps increasing. Any advice on how to solve or somewhat limit the memory consumption? (i am running the finetuned version from Magicbrush (https://github.com/OSU-NLP-Group/MagicBrush) therefore I cannot use diffusers library, given that the model has not been uploaded yet). I am running on a 24GB GPU.

Thank you!

giuseppecartella avatar Jul 08 '23 08:07 giuseppecartella

I am using the model in evaluation mode and I have already set the "model.eval().cuda()"

giuseppecartella avatar Jul 08 '23 09:07 giuseppecartella