Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** Error running postprocess_image: D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_faceswap.py #498

Open
3 tasks done
13mouseds opened this issue Aug 3, 2024 · 0 comments
Labels
bug Something isn't working 🔍 missing files Some files are missing, please reinstall the Extension

Comments

@13mouseds
Copy link

First, confirm

  • I have read the instruction carefully
  • I have searched the existing issues
  • I have updated the extension to the latest version

What happened?

*** Error running postprocess_image: D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_faceswap.py
Traceback (most recent call last):
File "D:\tool\AI\sd-webui-aki-v4.8\modules\scripts.py", line 912, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_faceswap.py", line 465, in postprocess_image
result, output, swapped = swap_face(
File "D:\tool\AI\sd-webui-aki-v4.8\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:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 773, in operate
result = apply_face_mask(swapped_image=swapped_image,target_image=result,target_face=target_face,entire_mask_image=entire_mask_image)
File "D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\reactor_modules\reactor_mask.py", line 55, in apply_face_mask
mask_generator = BiSeNetMaskGenerator()
File "D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_inferencers\bisenet_mask_generator.py", line 14, in init
self.mask_model = init_parsing_model(device=shared.device)
File "D:\tool\AI\sd-webui-aki-v4.8\python\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:\tool\AI\sd-webui-aki-v4.8\modules\safe.py", line 108, in load
return load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs)
File "D:\tool\AI\sd-webui-aki-v4.8\modules\safe.py", line 156, in load_with_extra
return unsafe_torch_load(filename, *args, **kwargs)
File "D:\tool\AI\sd-webui-aki-v4.8\python\lib\site-packages\torch\serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "D:\tool\AI\sd-webui-aki-v4.8\python\lib\site-packages\torch\serialization.py", line 1276, in _legacy_load
typed_storage._untyped_storage._set_from_file(
RuntimeError: unexpected EOF, expected 341179 more bytes. The file might be corrupted.

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

Sysinfo

SD-WEBUI

Relevant console log

*** Error running postprocess_image: D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_faceswap.py
    Traceback (most recent call last):
      File "D:\tool\AI\sd-webui-aki-v4.8\modules\scripts.py", line 912, in postprocess_image
        script.postprocess_image(p, pp, *script_args)
      File "D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_faceswap.py", line 465, in postprocess_image
        result, output, swapped = swap_face(
      File "D:\tool\AI\sd-webui-aki-v4.8\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:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 773, in operate
        result = apply_face_mask(swapped_image=swapped_image,target_image=result,target_face=target_face,entire_mask_image=entire_mask_image)
      File "D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\reactor_modules\reactor_mask.py", line 55, in apply_face_mask
        mask_generator =  BiSeNetMaskGenerator()
      File "D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_inferencers\bisenet_mask_generator.py", line 14, in __init__
        self.mask_model = init_parsing_model(device=shared.device)
      File "D:\tool\AI\sd-webui-aki-v4.8\python\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:\tool\AI\sd-webui-aki-v4.8\modules\safe.py", line 108, in load
        return load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs)
      File "D:\tool\AI\sd-webui-aki-v4.8\modules\safe.py", line 156, in load_with_extra
        return unsafe_torch_load(filename, *args, **kwargs)
      File "D:\tool\AI\sd-webui-aki-v4.8\python\lib\site-packages\torch\serialization.py", line 1040, in load
        return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
      File "D:\tool\AI\sd-webui-aki-v4.8\python\lib\site-packages\torch\serialization.py", line 1276, in _legacy_load
        typed_storage._untyped_storage._set_from_file(
    RuntimeError: unexpected EOF, expected 341179 more bytes. The file might be corrupted.

---
15:53:35 - ReActor - �[38;5;173mSTATUS�[0m - Working: source face index [0], target face index [0]
15:53:35 - ReActor - �[38;5;173mSTATUS�[0m - Using Hashed Source Face(s) Model...
15:53:35 - ReActor - �[38;5;173mSTATUS�[0m - Analyzing Target Image...
15:53:36 - ReActor - �[38;5;173mSTATUS�[0m - Detecting Source Face, Index = 0
15:53:36 - ReActor - �[38;5;173mSTATUS�[0m - Detected: -31- y.o. Female
15:53:36 - ReActor - �[38;5;173mSTATUS�[0m - Detecting Target Face, Index = 0
15:53:36 - ReActor - �[38;5;173mSTATUS�[0m - Detected: -23- y.o. Male
15:53:36 - ReActor - �[38;5;173mSTATUS�[0m - Swapping Source into Target
15:53:36 - ReActor - �[38;5;173mSTATUS�[0m - Correcting Face Mask
*** Error running postprocess_image: D:\tool\AI\sd-webui-aki-v4.8\extensions\sd-webui-reactor\scripts\reactor_faceswap.py
------------------------
Fault Traceback: 
Not Available

Additional information

No response

@13mouseds 13mouseds added bug Something isn't working new labels Aug 3, 2024
@Gourieff Gourieff added 🔍 missing files Some files are missing, please reinstall the Extension and removed new labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🔍 missing files Some files are missing, please reinstall the Extension
Projects
None yet
Development

No branches or pull requests

2 participants