Page 1 of 1

OSError: Unable to open file (truncated file: eof = 71163904, sblock->base_addr = 0, stored_eof = 90000392)

Posted: Fri Mar 10, 2023 11:56 pm
by Giova36

Hi, I have problem when i extract, i link below the log file. Sameone can help me?

Code: Select all

Loading...
Setting Faceswap backend to NVIDIA
03/11/2023 00:40:29 INFO     Log level set to: INFO
03/11/2023 00:40:31 INFO     Loading Detect from S3Fd plugin...
03/11/2023 00:40:31 INFO     Loading Align from Fan plugin...
03/11/2023 00:40:31 INFO     Loading Recognition from Vgg_Face2 plugin...
03/11/2023 00:40:31 INFO     Loading Mask from Components plugin...
03/11/2023 00:40:31 INFO     Loading Mask from Extended plugin...
03/11/2023 00:40:31 INFO     Loading Mask from Bisenet_Fp plugin...
03/11/2023 00:40:31 INFO     Reset batch sizes due to available VRAM: Detect: 1, Align: 1, Recognition: 2, Mask: 1
03/11/2023 00:40:31 INFO     Starting, this may take a while...
03/11/2023 00:40:31 INFO     Output Directory: C:\Users\anton\Desktop\test\Nuova cartella
03/11/2023 00:40:31 INFO     Initializing S3FD (Detect)...
03/11/2023 00:40:36 ERROR    Got Exception on main handler:
Traceback (most recent call last):
  File "C:\Users\anton\faceswap\lib\cli\launcher.pyy", line 230, in execute_script
    process.process()
  File "C:\Users\anton\faceswap\scripts\extract.pyy", line 178, in process
    extract.process()
  File "C:\Users\anton\faceswap\scripts\extract.pyy", line 702, in process
    self._run_extraction()
  File "C:\Users\anton\faceswap\scripts\extract.pyy", line 722, in _run_extraction
    self._extractor.launch()
  File "C:\Users\anton\faceswap\plugins\extract\pipeline.pyy", line 271, in launch
    self._launch_plugin(phase)
  File "C:\Users\anton\faceswap\plugins\extract\pipeline.pyy", line 700, in _launch_plugin
    plugin.initialize(**kwargs)
  File "C:\Users\anton\faceswap\plugins\extract\_base.pyy", line 481, in initialize
    self.init_model()
  File "C:\Users\anton\faceswap\plugins\extract\detect\s3fd.pyy", line 52, in init_model
    self.model = S3fd(self.model_path,
  File "C:\Users\anton\faceswap\plugins\extract\detect\s3fd.pyy", line 248, in __init__
    self.load_model_weights()
  File "C:\Users\anton\faceswap\lib\model\session.pyy", line 235, in load_model_weights
    self._model.load_weights(self._model_path)
  File "C:\Users\anton\MiniConda3\envs\faceswap\lib\site-packages\keras\utils\traceback_utils.pyy", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "C:\Users\anton\MiniConda3\envs\faceswap\lib\site-packages\h5py\_hl\files.pyy", line 567, in __init__
    fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
  File "C:\Users\anton\MiniConda3\envs\faceswap\lib\site-packages\h5py\_hl\files.pyy", line 231, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py\_objects.pyx", line 54, in h5pyy._objects.with_phil.wrapper
  File "h5py\_objects.pyx", line 55, in h5pyy._objects.with_phil.wrapper
  File "h5py\h5f.pyx", line 106, in h5py.h5f.open
OSError: Unable to open file (truncated file: eof = 71163904, sblock->base_addr = 0, stored_eof = 90000392)

Re: Bug

Posted: Sat Mar 11, 2023 7:06 pm
by torzdf

It looks like the model file has corrupted on download.

Go into your faceswap folder and into the .fs_cache folder and delete the file .h5 model files in that folder. This will cause the process to re-download them.


Re: Bug

Posted: Wed Jun 21, 2023 4:34 pm
by modernepic

I am seeing this same issue on Mac running through python and conda.

The file and path you are describing don't exist in my system. Do you have any idea where I could find a solution for this for a Mac?

Thank you!


Re: OSError: Unable to open file (truncated file: eof = 71163904, sblock->base_addr = 0, stored_eof = 90000392)

Posted: Wed Jun 21, 2023 4:50 pm
by bryanlyon

The path is there, you might have to enable hidden files to see it as files that start with a "." are typically hidden on *nix based systems. The command line is able to go to the folder as well.