stylegan2-pytorch
stylegan2-pytorch copied to clipboard
torch runtimerror
hi @lucidrains i've a issue when try to train with image with size of 512. Run the following line: stylegan2_pytorch --data ./flowers --multi-gpus --image-size 512
Issue:

Maybe i have to set additional parameters. if yes what have i to set? Thanks
Hi Marcello!
Can you check to make sure you aren't running out of memory?
@MarcelloPajntar97 Try setting your batch size lower and your gradient-accumulate-every higher
@MarcelloPajntar97 most people don't have the resources to train 512x512 and beyond, but you can try https://github.com/lucidrains/lightweight-gan to trade off quality for less resources!
@lucidrains when i run the command CUDA report me that i haven't enough free space to complete the operation, but i tried to clear it by the following: torch.cuda.empty_cache() but it didn't resolve the issue. If i decrease the batch size to 1 the train works but the results don't seem to be satisfactory that's why I've now stopped the training and started another with image size 256
Thanks a lot for the help, in the next few days I will look at the github link you sent :)
Yea, most people can't afford 512 or 1024, but as graphics card get more powerful, I'm sure those will be 'unlocked' in due time