Open Mega313 opened 11 months ago
The problem solved or not
The problem solved or not
Nope, No one helped me :/
Hi Mega313:
I was getting the "ValueError" and you gave me an idea how to fix it. Here is what I did to fix the problem you are having. I got this from one or two posts here. I'm giving you the code sandwiched between existing lines separated by a space:
opt.use_mask = True ## new feature up-to-date opt.Arc_path = './arcface_model/arcface_checkpoint.tar'
opt.isTrain = False opt.crop_size = 224 crop_size = opt.crop_size torch.nn.Module.dump_patches = True model = create_model(opt) model.eval() if crop_size == 512: opt.which_epoch = 550000 opt.name = '512' mode = 'ffhq' else: mode = 'None' app = Face_detect_crop(name='antelope', root='./insightface_func/models') app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640),mode=mode)
with torch.no_grad(): pic_a = opt.pic_a_path
Where to post this code explain with inages
My knowledge of coding is little simswap for single faces work perfectly but I tried the multi-faces swap code I hade this problem, I changed just the version of the dependancy from
!pip install insightface==0.2.1 onnxruntime moviepy !pip install googledrivedownloader !pip install imageio==2.4.1
to
!pip install -q torch==2.0.1 !pip install -q insightface==0.2.1 onnxruntime==1.15.1 !pip install -q moviepy==1.0.3 imageio==2.9.0 !pip install -q googledrivedownloader
to avoid the "ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']" there is also track under the number #446 with the same problem the code I used it from @neuralchen/simswap