Updated the code to support Video2Video lip sync video generation - #26
Open
AIExplorerIn404Island wants to merge 2 commits into
Open
Updated the code to support Video2Video lip sync video generation#26AIExplorerIn404Island wants to merge 2 commits into
AIExplorerIn404Island wants to merge 2 commits into
Conversation
Added support for video2video lip sync, allowing users to pass input video and audio for lip synchronization. Updated several files and provided usage instructions for the new feature.
|
Results are pretty bad. I tried it with a 56 second video of 256x256 dimension. No lip-sync! |
|
256x256 dimension wont work, keep the params proper. I m getting pretty good output. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have added the code to support video2video lip sync. Now with this code user can pass input video and audio and do the lip sync.
Changes are in -
modified: flash_talk/configs/infer_params.yaml
modified: flash_talk/inference.py
modified: flash_talk/infinite_talk/utils/multitalk_utils.py
modified: flash_talk/src/pipeline/flash_talk_pipeline.py
modified: generate_video.py
How to use the video2video inference
CUDA_VISIBLE_DEVICES=0
CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES python generate_video.py
--ckpt_dir models/SoulX-FlashTalk-14B
--wav2vec_dir models/chinese-wav2vec2-base
--input_prompt "A person is talking. Only the foreground characters are moving, the background remains static."
--cond_video examples/video.mp4
--audio_path examples/cantonese_16k.wav
--audio_encode_mode stream
just pass --cond_video examples/video.mp4 arg instead of --cond_image
Both --cond_image, --cond_video would work with this code.
flash_talk/configs/infer_params.yaml has different settings to generate HD/higher quality output which can be discarded, and default settings can be used to speed up the inference.
Thanks