-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in video swap #9
Comments
@w4hns1nn please help me |
Hey dxvan. looks like there's a face embedding missing in the stored faces.
Let me know if that solves your issue. Maybe you can attach more of your code? If there's a problem with the video itself consider to send it via wetransfer or on a similar way so that I can look into it. Nonetheless, I'd like to dive deeper in here, because the error should be catched and a better error message should be presented to the user. |
Dear @w4hns1nn , I have same issues. The below is my code.
I got these kind of messages until the end. 2it [00:00, 3.37it/s]Error in swapping frame 1 to KH: 'list' object has no attribute 'normed_embedding'. Skipping image |
I got a bug:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\daihoc\Lab\filter\face_swap\ApplySwap.py", line 34, in
video_face_swap()
File "C:\daihoc\Lab\filter\face_swap\ApplySwap.py", line 27, in video_face_swap
swapped = f2f.swap_to_face_in_video(faces="caprio", video=vf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\daihoc\Lab\filter\face_swap\core\mixins_video_swap.py", line 63, in swap_to_face_in_video
new_video = VideoFile().from_video_stream(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\media_toolkit\utils\dependency_requirements.py", line 18, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\media_toolkit\core\video\video_file.py", line 181, in from_video_stream
temp_video_file_path = video_from_image_generator(video_gen_wrapper, frame_rate=frame_rate, save_path=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\media_toolkit\utils\dependency_requirements.py", line 18, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\media_toolkit\core\video\video_utils.py", line 138, in video_from_image_generator
for i, img in image_generator:
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\tqdm\std.py", line 1181, in iter
for obj in iterable:
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\media_toolkit\core\video\video_file.py", line 165, in _frame_gen
for frame in video_audio_stream:
File "C:\daihoc\Lab\filter\face_swap\core\mixins_image_swap.py", line 177, in swap_to_face_generator
swapped = self._swap_faces(source_faces, target_faces, target_image, enhance_face_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\daihoc\Lab\filter\face_swap\core\mixins_image_swap.py", line 136, in _swap_faces
result = self._face_swapper.get(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\insightface\model_zoo\inswapper.py", line 50, in get
latent = source_face.normed_embedding.reshape((1,-1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'normed_embedding'
Can you fix help me :(
The text was updated successfully, but these errors were encountered: