From c4fd246c2dc3d7aff471a74e0a3a9dc57a7e1876 Mon Sep 17 00:00:00 2001 From: hixuco Date: Thu, 26 Sep 2024 20:46:36 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 332615dc..da7168a4 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ ## Changelog The previous changelog can be found [here](docs/changlelog.md). +- __[2024.09.26]__: Fix 1 for Error: with gr.Row().style(equal_height=False): AttributeError: 'Row' object has no attribute 'style' + +- __[2024.09.26]__: Fix 2 Add links for downloading more pretrained model, auido2pose_00140-model.pth and etc for REF - __[2023.06.12]__: Added more new features in WebUI extension, see the discussion [here](https://github.com/OpenTalker/SadTalker/discussions/386). @@ -145,6 +148,35 @@ We also provide an offline patch (`gfpgan/`), so no model will be downloaded whe * [GitHub Releases](https://github.com/OpenTalker/SadTalker/releases) * [Baidu (百度云盘)](https://pan.baidu.com/s/1kb1BCPaLOWX1JJb9Czbn6w?pwd=sadt) (Password: `sadt`) +[202409] Fix details: + Fix 1: + Error: with gr.Row().style(equal_height=False): AttributeError: 'Row' object has no attribute 'style' + REF: https://github.com/OpenTalker/SadTalker/issues/949 + app_sadtalker.zip Download this patch, and few extra fixes needed with gr.Audio, gr.Video + + Fix 2: + No such file or directory: 'checkpoints\\auido2pose_00140-model.pth' + REF: https://github.com/Zz-ww/SadTalker-Video-Lip-Sync + Download auido2pose_00140-model.pth and etc: + 百度网盘 https://pan.baidu.com/s/15-zjk64SGQnRT9qIduTe2A 提取码:klfv + Google drive:https://drive.google.com/file/d/1lW4mf5YNtS4MAD7ZkAauDDWp2N3_Qzs7/view?usp=sharing + 夸克网盘:https://pan.quark.cn/s/2a1042b1d046 提取码:zMBP +├──checkpoints +| ├──BFM_Fitting +| ├──DAIN_weight +| ├──hub +| ├──auido2exp_00300-model.pth +| ├──auido2pose_00140-model.pth +| ├──epoch_20.pth +| ├──facevid2vid_00189-model.pth.tar +| ├──GFPGANv1.3.pth +| ├──GPEN-BFR-512.pth +| ├──mapping_00109-model.pth.tar +| ├──ParseNet-latest.pth +| ├──RetinaFace-R50.pth +| ├──shape_predictor_68_face_landmarks.dat +| ├──wav2lip.pth + ### GFPGAN Offline Patch From e2231468e916f21c1a2e73fa3b3ff7d047419837 Mon Sep 17 00:00:00 2001 From: hixuco Date: Thu, 26 Sep 2024 20:50:07 +0800 Subject: [PATCH 2/2] Update app_sadtalker.py --- app_sadtalker.py | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/app_sadtalker.py b/app_sadtalker.py index 1401a600..74f6cecf 100644 --- a/app_sadtalker.py +++ b/app_sadtalker.py @@ -32,17 +32,38 @@ def sadtalker_demo(checkpoint_path='checkpoints', config_path='src/config', warp Homepage       \ Github ") - with gr.Row().style(equal_height=False): + submit = gr.Button('Generate', elem_id="sadtalker_generate", variant='primary') # Define the submit button here + + driven_audio = gr.Audio(label="Input audio", type="filepath", elem_id="driven_audio") # Define the driven_audio variable here + + preprocess_type = gr.Radio(['crop', 'resize','full', 'extcrop', 'extfull'], value='crop', label='preprocess', info="How to handle input image?") # Define the preprocess_type variable here + + is_still_mode = gr.Checkbox(label="Still Mode (fewer head motion, works with preprocess `full`)", elem_id="is_still_mode") # Define the is_still_mode variable here + + enhancer = gr.Checkbox(label="GFPGAN as Face enhancer", elem_id="enhancer") # Define the enhancer variable here + + batch_size = gr.Slider(label="batch size in generation", step=1, maximum=10, value=2, elem_id="batch_size") # Define the batch_size variable here + + size_of_image = gr.Radio([256, 512], value=256, label='face model resolution', info="use 256/512 model?", elem_id="size_of_image") # Define the size_of_image variable here + + pose_style = gr.Slider(minimum=0, maximum=46, step=1, label="Pose style", value=0, elem_id="pose_style") # Define the pose_style variable here + + gen_video = gr.Video(label="Generated video", format="mp4", elem_id="gen_video") # Define the gen_video variable here + + #with gr.Row().style(equal_height=False): + with gr.Row(): with gr.Column(variant='panel'): with gr.Tabs(elem_id="sadtalker_source_image"): with gr.TabItem('Upload image'): with gr.Row(): - source_image = gr.Image(label="Source image", source="upload", type="filepath", elem_id="img2img_image").style(width=512) - +# source_image = gr.Image(label="Source image", source="upload", type="filepath", elem_id="img2img_image").style(width=512) + source_image = gr.Image(label="Source image", type="filepath", elem_id="img2img_image") + with gr.Tabs(elem_id="sadtalker_driven_audio"): with gr.TabItem('Upload OR TTS'): with gr.Column(variant='panel'): - driven_audio = gr.Audio(label="Input audio", source="upload", type="filepath") +# driven_audio = gr.Audio(label="Input audio", source="upload", type="filepath") + driven_audio = gr.Audio(label="Input audio", type="filepath", elem_id="driven_audio") if sys.platform != 'win32' and not in_webui: from src.utils.text2speech import TTSTalker @@ -68,7 +89,8 @@ def sadtalker_demo(checkpoint_path='checkpoints', config_path='src/config', warp submit = gr.Button('Generate', elem_id="sadtalker_generate", variant='primary') with gr.Tabs(elem_id="sadtalker_genearted"): - gen_video = gr.Video(label="Generated video", format="mp4").style(width=256) +# gen_video = gr.Video(label="Generated video", format="mp4").style(width=256) + gen_video = gr.Video(label="Generated video", format="mp4") if warpfn: submit.click(