有人在尝试用stylegan3对ffhq、ffhqu或名人ffhq模型(和--cfg=stylegan2)进行细化时,有同样的张量尺寸错配吗?
对于afhqv2和metfaces,我在512和1048的尺寸上没有问题。
错误:
...
File "/home/ubuntu/stylegan3/training/training_loop.py", line 162, in training_loop
misc.copy_params_and_buffers(resume_data[name], module, require_all=False)
File "/home/ubuntu/stylegan3/torch_utils/misc.py", line 162, in copy_params_and_buffers
tensor.copy_(src_tensors[name].detach()).requires_grad_(tensor.requires_grad)
RuntimeError: The size of tensor a (512) must match the size of tensor b (256) at non-singleton dimension 0示例命令:
python "train.py" --outdir=training-runs --cfg=stylegan3-r --data="datasets/256.zip" --gpus=1 --batch=16 --batch-gpu=16 --gamma=6.6 --mirror=1 --kimg=2 --snap=5 --resume=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-ffhqu-256x256.pkl我已经验证了我传递了用这个工具构建的256张图像:
python dataset_tool.py --source="img/" --dest="datasets/256.zip" --resolution='256x256'注意:我只能用这个版本的stylegan2-ffhq-512x512.pkl完成编辑。
发布于 2022-02-14 15:32:10
如果您试图在"stylegan3-r-ffhqu-256x256.pkl“上进行迁移学习,则应添加
--cbase=16384在python "train.py" ...命令行中
https://stackoverflow.com/questions/71103106
复制相似问题