Gourieff / sd-webui-reactor

Fast and Simple Face Swap Extension for StableDiffusion WebUI (A1111 SD WebUI, SD WebUI Forge, SD.Next, Cagliostro)
GNU Affero General Public License v3.0
2.17k stars 235 forks source link

RuntimeError: unexpected EOF, expected 1938045 more bytes. The file might be corrupted. #415

Closed 158zd closed 1 month ago

158zd commented 1 month ago

First, confirm

What happened?

Reinstalled several times, still encountering the issue:RuntimeError: unexpected EOF, expected 1938045 more bytes. The file might be corrupted.

Steps to reproduce the problem

11:51:04 - ReActor - STATUS - Working: source face index [0], target face index [0] | 12/110 [06:28<48:47, 29.87s/it] 11:51:04 - ReActor - STATUS - Using Hashed Source Face(s) Model... 11:51:04 - ReActor - STATUS - Analyzing Target Image... 11:51:07 - ReActor - STATUS - Detecting Source Face, Index = 0 11:51:07 - ReActor - STATUS - Detected: -31- y.o. Female 11:51:07 - ReActor - STATUS - Detecting Target Face, Index = 0 11:51:07 - ReActor - STATUS - Detected: -23- y.o. Female 11:51:07 - ReActor - STATUS - Swapping Source into Target 11:51:07 - ReActor - STATUS - Restoring the face with CodeFormer (weight: 0.5) Error running postprocess_image: D:\ai\stable-diffusion-webui\extensions\sd-webui-reactor\scripts\reactor_faceswap.py Traceback (most recent call last): File "D:\ai\stable-diffusion-webui\modules\scripts.py", line 856, in postprocess_image script.postprocess_image(p, pp, script_args) File "D:\ai\stable-diffusion-webui\extensions\sd-webui-reactor\scripts\reactor_faceswap.py", line 450, in postprocess_image result, output, swapped = swap_face( File "D:\ai\stable-diffusion-webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 616, in swap_face result_image, output, swapped = operate(source_img,target_img,target_img_orig,model,source_faces_index,faces_index,source_faces,target_faces,gender_source,gender_target,source_face,wrong_gender,source_age,source_gender,output,swapped,mask_face,entire_mask_image,enhancement_options,detection_options) File "D:\ai\stable-diffusion-webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 812, in operate result_image = enhance_image(result_image, enhancement_options) File "D:\ai\stable-diffusion-webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 217, in enhance_image result_image = restore_face(result_image, enhancement_options) File "D:\ai\stable-diffusion-webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 172, in restore_face numpy_image = codeformer_model.codeformer.restore( File "D:\ai\stable-diffusion-webui\modules\codeformer_model.py", line 55, in restore return self.restore_with_helper(np_image, restore_face) File "D:\ai\stable-diffusion-webui\modules\face_restoration_utils.py", line 156, in restore_with_helper self.send_model_to(self.get_device()) File "D:\ai\stable-diffusion-webui\modules\face_restoration_utils.py", line 132, in send_model_to if self.face_helper: File "D:\ai\Anaconda\lib\functools.py", line 981, in get val = self.func(instance) File "D:\ai\stable-diffusion-webui\modules\face_restoration_utils.py", line 126, in face_helper return create_face_helper(self.get_device()) File "D:\ai\stable-diffusion-webui\modules\face_restoration_utils.py", line 47, in create_face_helper return FaceRestoreHelper( File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\facexlib\utils\face_restoration_helper.py", line 103, in init self.face_parse = init_parsing_model(model_name='parsenet', device=self.device, model_rootpath=model_rootpath) File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\facexlib\parsing__init__.py", line 20, in init_parsing_model load_net = torch.load(model_path, map_location=lambda storage, loc: storage) File "D:\ai\stable-diffusion-webui\modules\safe.py", line 108, in load return load_with_extra(filename, *args, extra_handler=global_extra_handler, *kwargs) File "D:\ai\stable-diffusion-webui\modules\safe.py", line 156, in load_with_extra return unsafe_torch_load(filename, args, kwargs) File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1028, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "D:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\serialization.py", line 1264, in _legacy_load typed_storage._untyped_storage._set_from_file( RuntimeError: unexpected EOF, expected 1938045 more bytes. The file might be corrupted.

Sysinfo

Computer: Windows 10 Python: 3.10.6 SD version: v1.8.0

Relevant console log

Using Anaconda3 and PyCharm installed Stable Diffusion

Additional information

No response