SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

帮看看为啥报错呢

Open dassiyu opened this issue 1 year ago • 3 comments

D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\auido2pose_00140-model.pth D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\NovelAI\stable-diffusion-webui\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "D:\NovelAI\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 "D:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\utils\preprocess.py", line 51, in init self.kp_extractor = KeypointExtractor(device) File "D:\NovelAI\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 "D:\NovelAI\stable-diffusion-webui\venv\lib\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 "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 106, in load return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs) File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 151, in load_with_extra return unsafe_torch_load(filename, *args, **kwargs) File "D:\NovelAI\stable-diffusion-webui\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:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1020, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 143949 more bytes. The file might be corrupted.

dassiyu avatar Apr 18 '23 12:04 dassiyu

D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat Error verifying pickled file from D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\hub\checkpoints\s3fd-619a316812.pth: Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 81, in check_pt with zipfile.ZipFile(filename) as z: File "D:\Programs\Python\Python310\lib\zipfile.py", line 1267, in init self._RealGetContents() File "D:\Programs\Python\Python310\lib\zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 135, in load_with_extra check_pt(filename, extra_handler) File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 102, in check_pt unpickler.load() File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 62, in find_class raise Exception(f"global '{module}/{name}' is forbidden") Exception: global 'torch._utils/_rebuild_tensor' is forbidden

The file may be malicious, so the program is not going to read it. You can skip this check with --disable-safe-unpickle commandline argument.

Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\NovelAI\stable-diffusion-webui\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "D:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\gradio_demo.py", line 64, 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:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\utils\preprocess.py", line 46, in init self.kp_extractor = KeypointExtractor(device) File "D:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\face3d\extract_kp_videos.py", line 16, in init self.detector = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device=device) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\face_alignment\api.py", line 77, in init self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose, **face_detector_kwargs) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\face_alignment\detection\sfd\sfd_detector.py", line 30, in init self.face_detector.load_state_dict(model_weights) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1624, in load_state_dict raise TypeError("Expected state_dict to be dict-like, got {}.".format(type(state_dict))) TypeError: Expected state_dict to be dict-like, got <class 'NoneType'>. D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat Error verifying pickled file from D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\hub\checkpoints\s3fd-619a316812.pth: Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 81, in check_pt with zipfile.ZipFile(filename) as z: File "D:\Programs\Python\Python310\lib\zipfile.py", line 1267, in init self._RealGetContents() File "D:\Programs\Python\Python310\lib\zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 135, in load_with_extra check_pt(filename, extra_handler) File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 102, in check_pt unpickler.load() File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 62, in find_class raise Exception(f"global '{module}/{name}' is forbidden") Exception: global 'torch._utils/_rebuild_tensor' is forbidden

The file may be malicious, so the program is not going to read it. You can skip this check with --disable-safe-unpickle commandline argument.

Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\NovelAI\stable-diffusion-webui\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "D:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\gradio_demo.py", line 64, 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:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\utils\preprocess.py", line 46, in init self.kp_extractor = KeypointExtractor(device) File "D:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\face3d\extract_kp_videos.py", line 16, in init self.detector = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device=device) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\face_alignment\api.py", line 77, in init self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose, **face_detector_kwargs) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\face_alignment\detection\sfd\sfd_detector.py", line 30, in init self.face_detector.load_state_dict(model_weights) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1624, in load_state_dict raise TypeError("Expected state_dict to be dict-like, got {}.".format(type(state_dict))) TypeError: Expected state_dict to be dict-like, got <class 'NoneType'>. D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\shape_predictor_68_face_landmarks.dat Error verifying pickled file from D:\NovelAI\stable-diffusion-webui\extensions\SadTalker\checkpoints\hub\checkpoints\s3fd-619a316812.pth: Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 81, in check_pt with zipfile.ZipFile(filename) as z: File "D:\Programs\Python\Python310\lib\zipfile.py", line 1267, in init self._RealGetContents() File "D:\Programs\Python\Python310\lib\zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 135, in load_with_extra check_pt(filename, extra_handler) File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 102, in check_pt unpickler.load() File "D:\NovelAI\stable-diffusion-webui\modules\safe.py", line 62, in find_class raise Exception(f"global '{module}/{name}' is forbidden") Exception: global 'torch._utils/_rebuild_tensor' is forbidden

The file may be malicious, so the program is not going to read it. You can skip this check with --disable-safe-unpickle commandline argument.

Traceback (most recent call last): File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\NovelAI\stable-diffusion-webui\modules\call_queue.py", line 15, in f res = func(*args, **kwargs) File "D:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\gradio_demo.py", line 64, 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:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\utils\preprocess.py", line 46, in init self.kp_extractor = KeypointExtractor(device) File "D:\NovelAI\stable-diffusion-webui/extensions/SadTalker\src\face3d\extract_kp_videos.py", line 16, in init self.detector = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device=device) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\face_alignment\api.py", line 77, in init self.face_detector = face_detector_module.FaceDetector(device=device, verbose=verbose, **face_detector_kwargs) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\face_alignment\detection\sfd\sfd_detector.py", line 30, in init self.face_detector.load_state_dict(model_weights) File "D:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1624, in load_state_dict raise TypeError("Expected state_dict to be dict-like, got {}.".format(type(state_dict))) TypeError: Expected state_dict to be dict-like, got <class 'NoneType'>.

dassiyu avatar Apr 18 '23 14:04 dassiyu

第一个问题,可以通过下载gfpgan的补丁包来解决, 查看这里:https://github.com/Winfredy/SadTalker#-2-download-trained-models 第二个问题,

# windows (webui_user.bat)
set COMMANDLINE_ARGS="--disable-safe-unpickle"

参考 https://github.com/Winfredy/SadTalker/blob/main/docs/webui_extension.md#questsions

vinthony avatar Apr 18 '23 15:04 vinthony

好的 谢谢 我试试

dassiyu avatar Apr 18 '23 15:04 dassiyu

https://github.com/Winfredy/SadTalker/blob/main/docs/webui_extension.md#questsions

怎么样,解决了吗?

IchvanHuang avatar May 30 '23 06:05 IchvanHuang