Critical Error - Need urgent assistance

If training is failing to start, and you are not receiving an error message telling you what to do, 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 Training process. If you want to get tips, or better understand the Training process, then you should look in the Training Discussion forum.

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

Locked
User avatar
thejokersnatch
Posts: 1
Joined: Fri Oct 22, 2021 10:20 am

Critical Error - Need urgent assistance

Post by thejokersnatch »

i7-4770K CPU
16 GB Ram
Nvidia Quadro K4000

I had been using Faceswap since two months now and everything was working well (though it failed to use GPU, it always used CPU which is beyond my understanding). I have extracted, trained and converted multiple videos for entertainment on the same system. However two days ago, as I left my CPU on training while I went to the office, something happened which is beyond my understanding since I'm no developer. I'm unable to open my projects, extract, train or convert any newer ones either.

P.S. I updated my software (using Help Menu > Update Faceswap) following the error thinking it might help but to no avail.

Following is the crash log I'm getting when I open my projects:

Code: Select all

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Program Files\faceswap\lib\serializer.py", line 166, in unmarshal
    retval = self._unmarshal(serialized_data)
  File "C:\Program Files\faceswap\lib\serializer.py", line 212, in _unmarshal
    return json.loads(data.decode("utf-8"))
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

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

Traceback (most recent call last):
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "C:\Program Files\faceswap\lib\gui\display_analysis.py", line 148, in _populate_from_folder
    self._load_session(full_path=os.path.join(folder, state_file))
  File "C:\Program Files\faceswap\lib\gui\display_analysis.py", line 253, in _load_session
    Session.initialize_session(model_dir, model_name, is_training=False)
  File "C:\Program Files\faceswap\lib\gui\analysis\stats.py", line 127, in initialize_session
    self._load_state_file()
  File "C:\Program Files\faceswap\lib\gui\analysis\stats.py", line 92, in _load_state_file
    self._state = serializer.load(state_file)
  File "C:\Program Files\faceswap\lib\serializer.py", line 109, in load
    retval = self.unmarshal(data)
  File "C:\Program Files\faceswap\lib\serializer.py", line 170, in unmarshal
    raise FaceswapError(msg) from err
lib.utils.FaceswapError: Error unserializing data for type <class 'bytes'>: Expecting value: line 1 column 1 (char 0)

Would appreciate the help to bring this to work once again.

User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: Critical Error - Need urgent assistance

Post by torzdf »

Your model's state file looks broken (it's the .json file inside your model folder). Ultimately it looks like it is empty for some reason.

Easiest solution would be to restore from backup or rollback to a previous snapshot.

My word is final

Locked