Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

显存不够,能否给点建议? #7

Closed
xuyu666 opened this issue Jul 25, 2023 · 6 comments
Closed

显存不够,能否给点建议? #7

xuyu666 opened this issue Jul 25, 2023 · 6 comments
Labels
good first issue Good for newcomers

Comments

@xuyu666
Copy link

xuyu666 commented Jul 25, 2023

您好,
我电脑只有12G显存,请问可以跑stylegan2-ada么,能够给点建议(尝试调整batchsize,但会带来一些bug),谢谢~

@Ldhlwh
Copy link
Owner

Ldhlwh commented Jul 25, 2023

@xuyu666 您好,

除了减小batch size还可以尝试减少channel,参考train.py里的args.G_kwargs.synthesis_kwargs.channel_base和channel_max

@xuyu666
Copy link
Author

xuyu666 commented Jul 26, 2023

谢谢你的回复,我尝试了你说的方法,修改成功了。但是运行的时候一直不动了(此时显存貌似没调用,但默认batch16时直接显存不足),具体如下:
image

@Ldhlwh
Copy link
Owner

Ldhlwh commented Jul 26, 2023

看这张图卡住的位置程序应该在算FID,默认要生成50k张图片,本身时间就比较久(几分钟以上)。这里可以尝试--metrics fid5k_full减少生成图片数量到5k张确认一下程序是否在正常运行

如果还是卡住,可以检查一下两个pytorch插件有没有配置成功

Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "upfirdn2d_plugin"... Done.

@xuyu666
Copy link
Author

xuyu666 commented Jul 26, 2023

好的谢谢,目前去掉指标测试后运行成功。另外想了解下您代码里的rank参数默认为0,能否对其修改。单卡gpu设置为1时,貌似存在一个冲突,具体如图所示。同时我看您论文中有提到supplementary material,能不能发我一份看看哈哈哈(ps: 邮箱2622960263@qq.com
批注 2023-07-26 173154

image

@Ldhlwh
Copy link
Owner

Ldhlwh commented Jul 26, 2023

rank这部分是StyleGAN-ADA的代码,我没有尝试过修改

补充材料在arxiv版本里有

@xuyu666
Copy link
Author

xuyu666 commented Jul 27, 2023

有看到,谢谢hahah~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants