stylegan2-pytorch
stylegan2-pytorch copied to clipboard
Out of memory when generating
Hello, I'm trying to generate from an 18x512 latent vector, with the code : image, latent = net.decoder([codes], input_is_latent=True) but when I do it I get this error : CUDA out of memory. Tried to allocate 294.00 MiB (GPU 0; 15.90 GiB total capacity; 14.58 GiB already allocated; 259.75 MiB free; 14.77 GiB reserved in total by PyTorch) I don't know what I did wrong...
Using torch.no_grad will reduce the memory consumption.
Thanks a lot !