SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

I got the following error while in the stable diffusion web UI, but I can run it alone

Open LeoCeasar opened this issue 1 year ago • 17 comments

/home/zentek/req/stable-diffusion-webui/extensions/SadTalker/checkpoints/auido2pose_00140-model.pth /home/zentek/req/stable-diffusion-webui/extensions/SadTalker/checkpoints/shape_predictor_68_face_landmarks.dat Traceback (most recent call last): File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/gradio/routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/gradio/blocks.py", line 1075, in process_api result = await self.call_function( File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/gradio/blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/home/zentek/req/stable-diffusion-webui/modules/call_queue.py", line 15, in f res = func(*args, **kwargs) File "/home/zentek/req/stable-diffusion-webui/extensions/SadTalker/src/gradio_demo.py", line 69, in test self.preprocess_model = CropAndExtract(self.path_of_lm_croper, self.path_of_net_recon_model, self.dir_of_BFM_fitting, self.device) File "/home/zentek/req/stable-diffusion-webui/extensions/SadTalker/src/utils/preprocess.py", line 52, in init self.kp_extractor = KeypointExtractor(device) File "/home/zentek/req/stable-diffusion-webui/extensions/SadTalker/src/face3d/extract_kp_videos_safe.py", line 35, in init self.det_net = init_detection_model('retinaface_resnet50', half=False,device=device) File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/facexlib/detection/init.py", line 22, in init_detection_model load_net = torch.load(model_path, map_location=lambda storage, loc: storage) File "/home/zentek/req/stable-diffusion-webui/modules/safe.py", line 106, in load return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs) File "/home/zentek/req/stable-diffusion-webui/modules/safe.py", line 151, in load_with_extra return unsafe_torch_load(filename, *args, **kwargs) File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/serialization.py", line 795, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/zentek/req/stable-diffusion-webui/venv/lib/python3.9/site-packages/torch/serialization.py", line 1020, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 823137 more bytes. The file might be corrupted.

LeoCeasar avatar Apr 19 '23 09:04 LeoCeasar

have you downloaded the gfpgan folder?

vinthony avatar Apr 19 '23 10:04 vinthony

I did

LeoCeasar avatar Apr 19 '23 11:04 LeoCeasar

in extensions/SadTalker/gfpgan?

vinthony avatar Apr 19 '23 11:04 vinthony

yes

LeoCeasar avatar Apr 20 '23 01:04 LeoCeasar

And I also redownload those files, both gfpgan and checkpoints

LeoCeasar avatar Apr 20 '23 01:04 LeoCeasar

you may need to download https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth again and save it to: ./gfpgan/weights/detection_Resnet50_Final.pth

vinthony avatar Apr 20 '23 02:04 vinthony

this is the md5 of that file, bce939bc22d8cec91229716dd932e56e ./detection_Resnet50_Final.pth_bak is that correct?

LeoCeasar avatar Apr 20 '23 03:04 LeoCeasar

MD5 (detection_Resnet50_Final.pth) = bce939bc22d8cec91229716dd932e56e

why there is a _bak?

vinthony avatar Apr 20 '23 03:04 vinthony

Yeah, they are the same. the _bak is since I rename the filename and was downloading a new one, as you suggested.

I can run the app alone with the command

python inference.py --driven_audio ./examples/driven_audio/bus_chinese.wav
--source_image ./examples/source_image/art_10.png
--result_dir ./
--still
--preprocess full
--enhancer gfpgan

but I cannot run it on the webui. what's the reason? I found a little difference in the parameters, is that the reason?

LeoCeasar avatar Apr 20 '23 03:04 LeoCeasar

any logs? the checkpoints are the same.

vinthony avatar Apr 20 '23 03:04 vinthony

the output is still the same.

RuntimeError: unexpected EOF, expected 823137 more bytes. The file might be corrupted.

Is there any way to get more detail logs?

LeoCeasar avatar Apr 20 '23 03:04 LeoCeasar

I reinstall the env, I follow the command that in the google colab. but I got a new problem

image

LeoCeasar avatar Apr 24 '23 09:04 LeoCeasar

and these are the files in that folder image

LeoCeasar avatar Apr 24 '23 09:04 LeoCeasar

are you install ffmpeg?

vinthony avatar Apr 24 '23 09:04 vinthony

if you are using mac, try brew install ffmpeg

vinthony avatar Apr 24 '23 09:04 vinthony

It's a new os, I may forgot ffmpeg. I used pip to install ffmpeg, but it still not work. It's in Ubuntu 20.04

LeoCeasar avatar Apr 24 '23 09:04 LeoCeasar

pip cannot install ffmpeg, you may need to install it via conda

vinthony avatar Apr 24 '23 12:04 vinthony