SadTalker
SadTalker copied to clipboard
help!!!
Traceback (most recent call last): File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\stable-diffusion-webui-master\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "D:\stable-diffusion-webui-master/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 "D:\stable-diffusion-webui-master/extensions/SadTalker\src\utils\preprocess.py", line 52, in init self.kp_extractor = KeypointExtractor(device) File "D:\stable-diffusion-webui-master/extensions/SadTalker\src\face3d\extract_kp_videos_safe.py", line 27, in init self.detector = init_alignment_model('awing_fan',device=device, model_rootpath=root_path) File "D:\stable-diffusion-webui-master\venv\lib\site-packages\facexlib\alignment_init_.py", line 19, in init_alignment_model model.load_state_dict(torch.load(model_path)['state_dict'], strict=True) File "D:\stable-diffusion-webui-master\modules\safe.py", line 106, in load return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs) File "D:\stable-diffusion-webui-master\modules\safe.py", line 151, in load_with_extra return unsafe_torch_load(filename, *args, **kwargs) File "D:\stable-diffusion-webui-master\venv\lib\site-packages\torch\serialization.py", line 795, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "D:\stable-diffusion-webui-master\venv\lib\site-packages\torch\serialization.py", line 1020, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 102280 more bytes. The file might be corrupted.
please update the codes, downloaded the gfpgan
files as here and put it in extensions/SadTalker/gfpgan
please update the codes, downloaded the
gfpgan
files as here and put it inextensions/SadTalker/gfpgan
I have already done what you said. but I still met the same problem.
现在这样了大佬
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\stable-diffusion-webui-master\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "D:\stable-diffusion-webui-master/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 "D:\stable-diffusion-webui-master/extensions/SadTalker\src\utils\preprocess.py", line 52, in init self.kp_extractor = KeypointExtractor(device) File "D:\stable-diffusion-webui-master/extensions/SadTalker\src\face3d\extract_kp_videos_safe.py", line 28, in init self.det_net = init_detection_model('retinaface_resnet50', half=False,device=device, model_rootpath=root_path) File "D:\stable-diffusion-webui-master\venv\lib\site-packages\facexlib\detection_init_.py", line 18, in init_detection_model model_path = load_file_from_url( File "D:\stable-diffusion-webui-master\modules\gfpgan_model.py", line 94, in facex_load_file_from_url return facex_load_file_from_url_orig(**dict(kwargs, save_dir=model_path, model_dir=None)) File "D:\stable-diffusion-webui-master\venv\lib\site-packages\facexlib\utils\misc.py", line 77, in load_file_from_url download_url_to_file(url, cached_file, hash_prefix=None, progress=progress) File "D:\stable-diffusion-webui-master\venv\lib\site-packages\torch\hub.py", line 597, in download_url_to_file u = urlopen(req) File "D:\python\lib\urllib\request.py", line 216, in urlopen return opener.open(url, data, timeout) File "D:\python\lib\urllib\request.py", line 519, in open response = self._open(req, data) File "D:\python\lib\urllib\request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "D:\python\lib\urllib\request.py", line 496, in _call_chain result = func(*args) File "D:\python\lib\urllib\request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "D:\python\lib\urllib\request.py", line 1351, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [WinError 10054] 远程主机强迫关闭了一个现有的连接。>
urllib.error.URLError: <urlopen error [WinError 10054] 远程主机强迫关闭了一个现有的连接。> 我记得这个错误好像不影响?
这样进度条基本上不走
D:\stable-diffusion-webui-master\extensions\SadTalker\checkpoints\auido2pose_00140-model.pth D:\stable-diffusion-webui-master\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to D:\stable-diffusion-webui-master\models\GFPGAN\detection_Resnet50_Final.pth
0%| | 120k/104M [00:50<7:59:12, 3.80kB/s]
这个是下模型哈。可以下载gfpgan的离线补丁包到extensions/SadTalker/gfpgan
,参考:

这个有办法解决吗
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 6.00 GiB total capacity; 4.94 GiB already allocated; 0 bytes free; 5.26 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
你的显卡多大呀?
这个有办法解决吗
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 6.00 GiB total capacity; 4.94 GiB already allocated; 0 bytes free; 5.26 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
你的显卡多大呀?
这个有办法解决吗 torch.cuda.OutOfMemoryError:CUDA 内存不足。尝试分配 128.00 MiB(GPU 0;6.00 GiB 总容量;4.94 GiB 已分配;0 字节空闲;PyTorch 总共保留 5.26 GiB)如果保留内存是 >> 已分配内存,请尝试设置 max_split_size_mb 以避免碎片。请参阅内存管理和 PYTORCH_CUDA_ALLOC_CONF 文档
6G N卡 3060
6G的话不要从SDwebui启动,直接跑inference.py 或者 app.py. sd的checkpoint会占用3G的显存