Closed jageshmaharjan closed 2 years ago
nvm, i wasn't so familiar with pytorch. simply should be:
def init_parser(pth_path):
n_classes = 19
net = BiSeNet(n_classes=n_classes)
net.cpu()
net.load_state_dict(torch.load(pth_path, map_location=torch.device('cpu')))
net.eval()
return net
I am trying to do inferencing but to some reason it's explicitly asking for GPU.
my script is:
python inference.py --checkpoint_path wav2lip_gan.pth --segmentation_path s3fd-619a316812.pth --sr_path esrgan_yunying.pth --face chroma_video_1.mp4 --audio wave_01.mp3 --outfile result.mp4
and the error is:
on face_parsing/swap.py file, under this function, is calling net.cuda(), how do i change it to cpu?