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

The Extraction process failing on you, and you aren't getting an error back with clear instructions? Tell us about it here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Extraction process. If you want to get tips, or better understand the Extract process, then you should look in the Extract Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
Giova36
Posts: 1
Joined: Fri Mar 10, 2023 11:42 pm

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

Post 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)
Last edited by bryanlyon on Wed Jun 21, 2023 4:49 pm, edited 1 time in total.
User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: Bug

Post 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.

My word is final

User avatar
modernepic
Posts: 1
Joined: Sun Jun 18, 2023 5:08 pm

Re: Bug

Post 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!

User avatar
bryanlyon
Site Admin
Posts: 793
Joined: Fri Jul 12, 2019 12:49 am
Answers: 44
Location: San Francisco
Has thanked: 4 times
Been thanked: 218 times
Contact:

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

Post 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.

Locked