e4s2024 / E4S2024

Official Implementation of 'E4S: Fine-grained Face Swapping via Editing With Regional GAN Inversion'
https://e4s2023.github.io/
MIT License
129 stars 18 forks source link

errors appeared when I clicked run #3

Closed arony5 closed 1 year ago

arony5 commented 1 year ago

root@autodl-container-c1bc119952-3b2429ee:~/autodl-tmp/E4S2023# python gradio_swap.py /root/miniconda3/lib/python3.8/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be removed in 0.17. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional. warnings.warn( Running on local URL: http://0.0.0.0:6006

To create a public link, set share=True in launch(). Load faceParsing pre-traiend model success! Traceback (most recent call last): File "/root/miniconda3/lib/python3.8/site-packages/gradio/queueing.py", line 427, in call_prediction output = await route_utils.call_process_api( File "/root/miniconda3/lib/python3.8/site-packages/gradio/route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "/root/miniconda3/lib/python3.8/site-packages/gradio/blocks.py", line 1484, in process_api result = await self.call_function( File "/root/miniconda3/lib/python3.8/site-packages/gradio/blocks.py", line 1106, in call_function prediction = await anyio.to_thread.run_sync( File "/root/miniconda3/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/root/miniconda3/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/root/miniconda3/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, args) File "/root/miniconda3/lib/python3.8/site-packages/gradio/utils.py", line 665, in wrapper response = f(args, kwargs) File "gradio_swap.py", line 72, in swap_image_gr global_holder["image"] = load_image_pipeline() File "gradio_swap.py", line 26, in load_image_pipeline pipeline = FaceSwap() File "/root/autodl-tmp/E4S2023/Face_swap_with_two_imgs.py", line 109, in init save_dict = torch.load(opts.checkpoint_path) File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 797, in load with _open_zipfile_reader(opened_file) as opened_zipfile: File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 283, in init super().init(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory Traceback (most recent call last): File "/root/miniconda3/lib/python3.8/site-packages/gradio/queueing.py", line 427, in call_prediction output = await route_utils.call_process_api( File "/root/miniconda3/lib/python3.8/site-packages/gradio/route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "/root/miniconda3/lib/python3.8/site-packages/gradio/blocks.py", line 1484, in process_api result = await self.call_function( File "/root/miniconda3/lib/python3.8/site-packages/gradio/blocks.py", line 1106, in call_function prediction = await anyio.to_thread.run_sync( File "/root/miniconda3/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/root/miniconda3/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/root/miniconda3/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, args) File "/root/miniconda3/lib/python3.8/site-packages/gradio/utils.py", line 665, in wrapper response = f(args, kwargs) File "gradio_swap.py", line 72, in swap_image_gr global_holder["image"] = load_image_pipeline() File "gradio_swap.py", line 26, in load_image_pipeline pipeline = FaceSwap() File "/root/autodl-tmp/E4S2023/Face_swap_with_two_imgs.py", line 109, in init save_dict = torch.load(opts.checkpoint_path) File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 797, in load with _open_zipfile_reader(opened_file) as opened_zipfile: File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 283, in init super().init(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/root/miniconda3/lib/python3.8/site-packages/gradio/queueing.py", line 472, in process_events response = await self.call_prediction(awake_events, batch) File "/root/miniconda3/lib/python3.8/site-packages/gradio/queueing.py", line 436, in call_prediction raise Exception(str(error) if show_error else None) from error Exception: None

arony5 commented 1 year ago

solved, It was an issue with the incomplete weight file.