ganavatar icon indicating copy to clipboard operation
ganavatar copied to clipboard

Unable to recreate the experiment due to tensor mismatch in eg3d

Open stigbosmans opened this issue 11 months ago • 1 comments

I followed the instructions of the readme.md, I was however unable to run these instructions successfully due to an error I receive when training the eg3d model on the INSTA data (generated by the insta2ganavatar). I'm not sure if this is due to the input dataset because the insta2ganavatar script doesn't seem to function fully. It only loads test_dataset.json, and misses the functionality to copy the image files, so I had to manually copy the INSTA/nf_01/images_cropped images to the dataset/ganavatar/nf_01.

When running the eg3d train method it can't start training due to a tensor dimension missmatch in pytorch:

Exception has occurred: RuntimeError The size of tensor a (8) must match the size of tensor b (6) at non-singleton dimension 1 File "/workspace/ganavatar/eg3d/eg3d/torch_utils/misc.py", line 164, in copy_params_and_buffers tensor.copy_(src_tensors[name].detach()).requires_grad_(tensor.requires_grad) File "/workspace/ganavatar/eg3d/eg3d/training/training_loop.py", line 169, in training_loop misc.copy_params_and_buffers(resume_data[name], module, require_all=False) File "/workspace/ganavatar/eg3d/eg3d/train.py", line 52, in subprocess_fn training_loop.training_loop(rank=rank, **c) File "/workspace/ganavatar/eg3d/eg3d/train.py", line 101, in launch_training subprocess_fn(rank=0, c=c, temp_dir=temp_dir) File "/workspace/ganavatar/eg3d/eg3d/train.py", line 391, in main launch_training(c=c, desc=desc, outdir=opts.outdir, dry_run=opts.dry_run) File "/workspace/ganavatar/eg3d/eg3d/train.py", line 396, in <module> main() # pylint: disable=no-value-for-parameter RuntimeError: The size of tensor a (8) must match the size of tensor b (6) at non-singleton dimension 1

Which is related to a tensor b512.fromrgb.weight

Does anyone have any insights on what the cause of this might be? Is there an update on the insta2ganavatar script pending? It seems to be incomplete.

Thank you.

stigbosmans avatar Mar 15 '24 14:03 stigbosmans

maybe change the images channel (4-->3) will help.

zzshh avatar Apr 09 '24 09:04 zzshh