I loaded the pre-training weights during training and the resolution matches my training set, but an error is reported in train.py. If it works fine without pre-training weights, which file do I need to change?
Traceback (most recent call last):
File "train.py", line 369, in
-- Process 0 terminated with the following error: Traceback (most recent call last): File "/root/miniconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 59, in wrap fn(i, *args) File "/root/autodl-tmp/stylegan3-fun-main/train.py", line 50, in subprocess_fn training_loop.training_loop(rank=rank, **c) File "/root/autodl-tmp/stylegan3-fun-main/training/training_loop.py", line 163, in training_loop misc.copy_params_and_buffers(resume_data[name], module, require_all=False) File "/root/autodl-tmp/stylegan3-fun-main/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 (4) must match the size of tensor b (3) at non-singleton dimension 1
python train.py --outdir=training-runs --cfg=stylegan3-t --data=/root/autodl-tmp/stylegan3-fun-main/hechengtupianrgba.zip --gpus=4 --batch=16 --gamma=6 --mirror=1 --kimg=5000 --snap=25 --batch-gpu=4 --metrics=none --resume=/root/autodl-tmp/stylegan3-fun-main/network-snapshot-011000.pkl
Basically, the mismatch says it's when trying to load the pre-trained .pkl on the newly constructed stylegan3-t configuration. I'll try to fix it, as it also failed with me with a pre-trained StyleGAN3-T model, so perhaps the construction of the new networks is wrong. I'll update this whenever I can fix it.
Thanks for the reply.