torzdf wrote: ↑Sat Apr 20, 2024 11:47 am
I'm not sure what you mean by this? I haven' t obsoleted any args... at least not knowingly. I deprecated a load a little while back, but the deprecated args are stilll valid.
I submitted a lengthy response with examples but my session expired and I'm not going to do it all again ... but here was the gist:
Converting using the updated faceswap on old alignments gave me this:
Code: Select all
Converting file 1 of 1, Jennifer Lopez ft. Iggy Azalea - Booty (HD 1080p).
Setting Faceswap backend to NVIDIA
04/20/2024 14:05:24 INFO Log level set to: INFO
04/20/2024 14:05:26 WARNING Command line option '-al' has been deprecated and will be removed from a future update. Use '-p, --alignments_path' instead
04/20/2024 14:05:26 WARNING Command line option '-ref' has been deprecated and will be removed from a future update. Use '-r, --reference_video' instead
04/20/2024 14:05:26 WARNING Command line option '-osc' has been deprecated and will be removed from a future update. Use '-O, --output_scale' instead
04/20/2024 14:05:27 INFO Reading alignments from: '\\-removed-\face_vidslib\jlo\Jennifer Lopez ft. Iggy Azalea - Booty (HD 1080p)_alignments.fsa'
04/20/2024 14:05:27 INFO Loading Model from Phaze_A plugin...
04/20/2024 14:05:27 INFO Config item: 'autoclip' has been updated from 'True' to 'False'
04/20/2024 14:05:27 INFO Config item: 'mixed_precision' has been updated from 'True' to 'False'
04/20/2024 14:05:27 INFO Config item: 'loss_function' has been updated from 'smooth_loss' to 'ssim'
04/20/2024 14:05:27 INFO Config item: 'loss_function_2' has been updated from 'ms_ssim' to 'mse'
04/20/2024 14:05:27 INFO Config item: 'loss_function_3' has been updated from 'ffl' to 'None'
04/20/2024 14:05:27 INFO Config item: 'loss_weight_3' has been updated from '25' to '0'
04/20/2024 14:05:27 INFO Config item: 'loss_function_4' has been updated from 'lpips_alex' to 'None'
04/20/2024 14:05:27 INFO Config item: 'loss_weight_4' has been updated from '5' to '0'
04/20/2024 14:05:27 INFO Config item: 'mask_loss_function' has been updated from 'mae' to 'mse'
04/20/2024 14:05:27 INFO Config item: 'freeze_layers' has been updated from '['visual']' to '['keras_encoder']'
04/20/2024 14:05:27 INFO Using configuration saved in state file
04/20/2024 14:05:27 INFO Mixed precision compatibility check (mixed_float16): OK\nYour GPU will likely run quickly with dtype policy mixed_float16 as it has compute capability of at least 7.0. Your GPU: NVIDIA GeForce RTX 4060 Ti, compute capability 8.9
04/20/2024 14:05:59 INFO Loaded model from disk: '\\-removed-\d\sample_data\models\_Phaze-A\-removed-\phaze_a.h5'
04/20/2024 14:05:59 INFO Loading Writer from Ffmpeg plugin...
04/20/2024 14:05:59 INFO Outputting to: '\\-removed-\d\face_sample_data\video_src\vidout\deepfakes\phaze_a\-removed-\Jennifer Lopez ft. Iggy Azalea - Booty (HD 1080p)_converted_1.mp4'
04/20/2024 14:05:59 INFO Loading Mask from Mask_Blend plugin...
04/20/2024 14:05:59 INFO Loading Color from Avg_Color plugin...
04/20/2024 14:05:59 INFO Loading Scaling from Sharpen plugin...
04/20/2024 14:07:45 ERROR Failed to convert image: 'Jennifer Lopez ft. Iggy Azalea - Booty (HD 1080p)_002585.mp4'. Reason: 'bisenet-fp_face'
04/20/2024 14:07:45 WARNING Convert error traceback:
Traceback (most recent call last):
File "C:\Users\-removed-\faceswap\lib\convert.py", line 203, in process
image = self._patch_image(item)
File "C:\Users\-removed-\faceswap\lib\convert.py", line 267, in _patch_image
new_image, background = self._get_new_image(predicted, frame_size)
File "C:\Users\-removed-\faceswap\lib\convert.py", line 363, in _get_new_image
new_face = self._pre_warp_adjustments(new_face,
File "C:\Users\-removed-\faceswap\lib\convert.py", line 415, in _pre_warp_adjustments
new_face, raw_mask = self._get_image_mask(new_face,
File "C:\Users\-removed-\faceswap\lib\convert.py", line 456, in _get_image_mask
mask_centering = detected_face.mask[self._args.mask_type].stored_centering
KeyError: 'bisenet-fp_face'
I don't know why it would KeyError only once on that frame, but the rest of it finished properly.
So I updated the powershell script to use the recommended args in the warning, and got this:
Code: Select all
Converting file 1 of 1, Jennifer Lopez ft. Iggy Azalea - Booty (HD 1080p).
Setting Faceswap backend to NVIDIA
usage: faceswap.py [-h] {extract,train,convert,gui} ...
positional arguments:
{extract,train,convert,gui}
extract Extract the faces from pictures or a video
train Train a model for the two faces A and B
convert Convert source pictures or video to a new one with the face swapped
gui Launch the Faceswap Graphical User Interface
options:
-h, --help show this help message and exit
faceswap.py: error: unrecognized arguments: --alignments_path \\-removed-\face_vidslib\jlo\Jennifer Lopez ft. Iggy Azalea - Booty (HD 1080p)_alignments.fsa --reference_video \\-removed-\face_vidslib\jlo\Jennifer Lopez ft. Iggy Azalea - Booty (HD 1080p).mp4 --output_scale 100
(faceswap) PS C:\WINDOWS\system32>
I realized it's the warning message that's wrong (showing underscores), not the code (using dashes). So, hopefully the args don't change further and I can leave the scripts alone.
Now on to the Skipped frames issue lol