zyainfal / One-Shot-Face-Swapping-on-Megapixels

One Shot Face Swapping on Megapixels.
Other
314 stars 40 forks source link

environmental problems? #44

Open goldwater668 opened 2 years ago

goldwater668 commented 2 years ago

import torch torch.version '1.5.0' torch.cuda.is_available() True torch.version.cuda '10.2' torch.backends.cudnn.version() 7605 torch.tensor([1.0, 2.0]).cuda() tensor([1., 2.], device='cuda:0')

What's going on, the environment pytorch can run, but the local code can't run?

(osfs) [root@master1 stylegan2-pytorch]# python inference.py which: no hipcc in (/usr/local/cuda-10.2/bin:/data/hjq/tools/anaconda3/envs/osfs/bin:/data/hjq/tools/anaconda3/condabin:/data/hjq/faceid_src/yc_tools/jmeter/apache-jmeter-5.4.1/bin:/data/hjq/faceid_src/yc_tools/jvm/jdk1.8.0_301/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/snapd/snap/bin:/root/.jx/bin:/snap/bin:/root/bin) load encoder & swapper: ./inference/checkpoint/ftm_final.pth load generator: ./inference/checkpoint/stylegan2-ffhq-config-f.pth /data/hjq/tools/anaconda3/envs/osfs/lib/python3.6/site-packages/torch/nn/functional.py:2796: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.") Traceback (most recent call last): File "inference.py", line 193, in handler.run(args.srcID, args.tgtID) File "inference.py", line 124, in run swapped_face = self.swap(source, target) File "inference.py", line 146, in swap fakeswap, = self.generator(att_struct, [swapped_lats, None], randomize_noise=False) File "/data/hjq/tools/anaconda3/envs/osfs/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/data/hjq/stylegan2-pytorch/megafs.py", line 973, in forward skip = self.to_rgb1(out, latent[:, 1]) File "/data/hjq/tools/anaconda3/envs/osfs/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, *kwargs) File "/data/hjq/stylegan2-pytorch/megafs.py", line 800, in forward out = self.conv(input, style) File "/data/hjq/tools/anaconda3/envs/osfs/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(input, kwargs) File "/data/hjq/stylegan2-pytorch/megafs.py", line 682, in forward style = self.modulation(style).view(batch, 1, in_channel, 1, 1) File "/data/hjq/tools/anaconda3/envs/osfs/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, *kwargs) File "/data/hjq/stylegan2-pytorch/megafs.py", line 601, in forward input, self.weight self.scale, bias=self.bias * self.lr_mul RuntimeError: CUDA error: no kernel image is available for execution on the device