kenwaytis / faster-SadTalker-API

The API server version of the SadTalker project. Runs in Docker, 10 times faster than the original!
MIT License
109 stars 18 forks source link

大佬,为什么每次调用完localhost:10364/pipeline这个接口后,再次调用就会没反应,问题出在哪里了呢? #9

Open Zenless-Zone-Zero opened 8 months ago

Zenless-Zone-Zero commented 8 months ago

启动docker容器之后重复调用pipeline接口不会再生成视频,必须重启docker之后才能再次调用,我想问是我这边有什么参数配置方面的问题还是大家都会这样?

Zenless-Zone-Zero commented 8 months ago

Hello, why every time after calling the localhost:10364/pipeline interface, the next call will not respond, what is the problem?

Zenless-Zone-Zero commented 8 months ago

【The following is the log print of the calling interface, the last line is the status of the second call, and there will be no further response】:

root@Administrator:/home/gk/project/faster-SadTalker-API-main# docker compose up [+] Running 2/0 ✔ Container tts Created 0.0s ✔ Container sadtalker Created 0.0s Attaching to sadtalker, tts sadtalker | sadtalker | ========== sadtalker | == CUDA == sadtalker | ========== sadtalker | sadtalker | CUDA Version 11.6.2 sadtalker | sadtalker | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. sadtalker | sadtalker | This container image and its contents are governed by the NVIDIA Deep Learning Container License. sadtalker | By pulling and using the container, you accept the terms and conditions of this license: sadtalker | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license sadtalker | sadtalker | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience. sadtalker | tts | INFO: Will watch for changes in these directories: ['/home/tts'] tts | INFO: Uvicorn running on http://0.0.0.0:9566 (Press CTRL+C to quit) tts | INFO: Started reloader process [1] using StatReload sadtalker | INFO: Will watch for changes in these directories: ['/home/SadTalker'] sadtalker | INFO: Uvicorn running on http://0.0.0.0:10364 (Press CTRL+C to quit) sadtalker | INFO: Started reloader process [1] using WatchFiles tts | 2023-10-20 08:13:55,097 - modelscope - INFO - PyTorch version 1.11.0+cu113 Found. tts | 2023-10-20 08:13:55,102 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer tts | 2023-10-20 08:13:55,207 - modelscope - INFO - Loading done! Current index file version is 1.7.1, with md5 daef64b4bdf32997868bf5dc7b6c89d7 and a total number of 861 components indexed tts | INFO: Started server process [7] tts | INFO: Waiting for application startup. tts | 2023-10-20 08:13:55.988 | INFO | main:startup_event:117 - Application is starting up! tts | 2023-10-20 08:13:56,533 - modelscope - INFO - Model revision not specified, use the latest revision: v1.0.0 tts | 2023-10-20 08:13:58,391 - modelscope - INFO - initiate model from /root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k tts | 2023-10-20 08:13:58,391 - modelscope - INFO - initiate model from location /root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k. tts | 2023-10-20 08:13:58,392 - modelscope - INFO - initialize model from /root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k tts | 2023-10-20 08:13:58,422 - modelscope - INFO - am_config=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/am/config.yaml voc_config=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/voc/config.yaml tts | 2023-10-20 08:13:58,422 - modelscope - INFO - audio_config=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/audio_config.yaml tts | 2023-10-20 08:13:58,422 - modelscope - INFO - am_ckpts=OrderedDict([(708720, '/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/am/ckpt/checkpoint_708720.pth')]) tts | 2023-10-20 08:13:58,423 - modelscope - INFO - voc_ckpts=OrderedDict([(1280000, '/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/voc/ckpt/checkpoint_01280000.pth')]) tts | 2023-10-20 08:13:58,423 - modelscope - INFO - se_path=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/am/se.npy se_model_path=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/se/ckpt/se.onnx tts | 2023-10-20 08:13:58,423 - modelscope - INFO - mvn_path=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k/voices/F7/am/mvn.npy tts | 2023-10-20 08:14:02,156 - modelscope - WARNING - No preprocessor field found in cfg. tts | 2023-10-20 08:14:02,156 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. tts | 2023-10-20 08:14:02,156 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': '/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhiya_zh-cn_16k'}. trying to build by task and model information. tts | 2023-10-20 08:14:02,156 - modelscope - WARNING - No preprocessor key ('sambert-hifigan', 'text-to-speech') found in PREPROCESSOR_MAP, skip building preprocessor. tts | 2023-10-20 08:14:02.157 | INFO | main:init_model:48 - loading model: {zhiya} tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | text.cc: festival_Text_init sadtalker | INFO: Started server process [28] sadtalker | INFO: Waiting for application startup. sadtalker | INFO: Application startup complete. tts | 2023-10-20 08:14:12.731 | INFO | main:startup_event:124 - zhiya model load is sucessful! tts | INFO: Application startup complete. sadtalker | WARNING: WatchFiles detected changes in 'main.py'. Reloading... sadtalker | INFO: Shutting down sadtalker | INFO: Waiting for application shutdown. sadtalker | INFO: Application shutdown complete. sadtalker | INFO: Finished server process [28] sadtalker | using safetensor as default sadtalker | INFO: Started server process [104] sadtalker | INFO: Waiting for application startup. sadtalker | INFO: Application startup complete. sadtalker | 2023-10-20 08:15:32.345 | INFO | main:predict_image:40 - -------------pipeline---------------- tts | 2023-10-20 08:15:32.454 | INFO | main:tts:69 - tts is begining. ^[[A^[[A^[tts | 2023-10-20 08:15:36,460 - modelscope - INFO - Model revision not specified, use the latest revision: v1.2.0 tts | 2023-10-20 08:15:36,947 - modelscope - INFO - initiate model from /root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k tts | 2023-10-20 08:15:36,947 - modelscope - INFO - initiate model from location /root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k. tts | 2023-10-20 08:15:36,955 - modelscope - INFO - initialize model from /root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k tts | 2023-10-20 08:15:36,972 - modelscope - INFO - am_config=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/am/config.yaml voc_config=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/voc/config.yaml tts | 2023-10-20 08:15:36,972 - modelscope - INFO - audio_config=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/audio_config.yaml tts | 2023-10-20 08:15:36,973 - modelscope - INFO - am_ckpts=OrderedDict([(716690, '/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/am/ckpt/checkpoint_716690.pth')]) tts | 2023-10-20 08:15:36,973 - modelscope - INFO - voc_ckpts=OrderedDict([(1280000, '/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/voc/ckpt/checkpoint_01280000.pth')]) tts | 2023-10-20 08:15:36,973 - modelscope - INFO - se_path=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/am/se.npy se_model_path=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/se/ckpt/se.onnx tts | 2023-10-20 08:15:36,973 - modelscope - INFO - mvn_path=/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k/voices/F7/am/mvn.npy tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | festival_initialize() called more than once tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | Load pinyin_en_mix_dict failed tts | 2023-10-20 08:15:40,792 - modelscope - WARNING - No preprocessor field found in cfg. tts | 2023-10-20 08:15:40,793 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. tts | 2023-10-20 08:15:40,793 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': '/root/.cache/modelscope/hub/damo/speech_sambert-hifigan_tts_zhisha_zh-cn_16k'}. trying to build by task and model information. tts | 2023-10-20 08:15:40,793 - modelscope - WARNING - No preprocessor key ('sambert-hifigan', 'text-to-speech') found in PREPROCESSOR_MAP, skip building preprocessor. tts | 2023-10-20 08:15:40.796 | INFO | main:init_model:48 - loading model: {zhisha} tts | Removing weight norm... tts | Removing weight norm... tts | INFO: 172.18.0.2:36896 - "POST /tts HTTP/1.1" 200 OK sadtalker | using safetensor as default sadtalker | ------------pipeline------------ landmark Det:: 100%|██████████| 1/1 [00:00<00:00, 14.67it/s] 3DMM Extraction In Video:: 100%|██████████| 1/1 [00:00<00:00, 18.49it/s] mel:: 100%|██████████| 15/15 [00:00<00:00, 23241.43it/s] audio2exp:: 100%|██████████| 2/2 [00:00<00:00, 94.66it/s] Face Renderer:: 100%|██████████| 15/15 [00:03<00:00, 3.96it/s] sadtalker | face enhancer.... Face Enhancer:: 100%|██████████| 15/15 [00:03<00:00, 3.96it/s] sadtalker | infer time: 2.4327744280001298 sadtalker | infer time: 0.07885554099993897 sadtalker | infer time: 0.08111190700014959 sadtalker | infer time: 0.08303174100001343 sadtalker | infer time: 0.08081409000010353 sadtalker | infer time: 0.07926692099999855 sadtalker | infer time: 0.0805255389998365 sadtalker | infer time: 0.08006213299995579 sadtalker | infer time: 0.08083718800003226 sadtalker | infer time: 0.08026250700004312 sadtalker | infer time: 0.08713013699980365 sadtalker | infer time: 0.0828945980001663 sadtalker | infer time: 0.08360444900017683 sadtalker | infer time: 0.08141870200006451 sadtalker | infer time: 0.07987200000002304 sadtalker | The generated video is named /home/SadTalker/results/2023_10_20_08.15.32/sadtalker_default##001_enhanced.mp4 sadtalker | The generated video is named /home/SadTalker/results/2023_10_20_08.15.32/sadtalker_default##001_full.mp4 sadtalker | INFO: 172.18.0.1:44154 - "POST /pipeline HTTP/1.1" 200 OK seamlessClone:: 100%|██████████| 15/15 [00:00<00:00, 39.00it/s] sadtalker | 2023-10-20 08:19:57.386 | INFO | main:predict_image:40 - -------------pipeline----------------

qxt-expor commented 3 months ago

我跟你一模一样