From 1206fd54e2c3643015c56b427d5d89d0f233e9f4 Mon Sep 17 00:00:00 2001 From: ikaros <327209194@qq.com> Date: Tue, 9 Apr 2024 17:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E9=94=99=E8=AF=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api_server.py | 8 ++++++-- config.json | 4 ++-- tests/sadtalker.py | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/api_server.py b/api_server.py index 28cfe05..1d01c28 100644 --- a/api_server.py +++ b/api_server.py @@ -63,6 +63,10 @@ def get_video(type: str, audio_path: str): config.get("sadtalker", "pose_style"), # float (numeric value between 0 and 46) in 'Pose style' Slider component api_name="/test" ) + + logging.info(f'合成成功,生成在:{result["video"]}') + + return result["video"] else: result = client.predict( config.get("sadtalker", "img_file"), # filepath in 'Source image' Image component @@ -76,9 +80,9 @@ def get_video(type: str, audio_path: str): fn_index=1 ) - logging.info(f'合成成功,生成在:{result["video"]}') + logging.info(f'合成成功,生成在:{result}') - return result["video"] + return result elif type == "genefaceplusplus": client = Client(config.get("genefaceplusplus", "api_ip_port")) result = client.predict( diff --git a/config.json b/config.json index dafbc1d..496a0a7 100644 --- a/config.json +++ b/config.json @@ -25,8 +25,8 @@ "img_file": "E:\\GitHub_pro\\digital_human_video_player\\static\\imgs\\2.png", "preprocess": "crop", "still_mode": false, - "GFPGAN": true, - "batch_size": 4, + "GFPGAN": false, + "batch_size": 2, "face_model_resolution": 256, "pose_style": 0 }, diff --git a/tests/sadtalker.py b/tests/sadtalker.py index a7ce1ef..af29211 100644 --- a/tests/sadtalker.py +++ b/tests/sadtalker.py @@ -13,7 +13,7 @@ # api_name="/test" # ) -client = Client("https://u373179-884c-4835511a.westc.gpuhub.com:8443/") +client = Client("https://--.westc.gpuhub.com:8443/") result = client.predict( "C:\\Users\\Administrator\\Pictures\\test\\1.png", # filepath in 'Source image' Image component "C:\\Users\\Administrator\\Pictures\\test\\2.mp3", # filepath in 'Input audio' Audio component