An unexpected crash has occurred(tools-preview), and cann't get a new video when using "convert"

Got questions or tips about the Conversion process? This is the place to discuss them.


Forum rules

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

This forum is for discussing tips and understanding the process involved with Converting faces from your trained model.

If you are having issues with the Convert process not working as you would expect, then you should post in the Convert Support forum.

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

Post Reply
User avatar
wsyn470
Posts: 8
Joined: Mon Feb 13, 2023 4:46 am
Has thanked: 1 time

An unexpected crash has occurred(tools-preview), and cann't get a new video when using "convert"

Post by wsyn470 »

  1. An unexpected crash has occurred(tools-preview)

    Code: Select all

    Crash report written to 'C:\Users\wsyn4\faceswap\crash_report.2023.12.04.202616994062.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting.

    The report is in attachment.

  2. I cann't get a new video when using "convert", only get new pictures:

    Code: Select all

    12/04/2023 20:31:57 INFO     Reading alignments from: 'D:\faceswap\LSS\a_alignments_20231130_012544.fsa'
    12/04/2023 20:31:57 INFO     Loading Model from Realface plugin...
    12/04/2023 20:31:57 INFO     Using configuration saved in state file
    12/04/2023 20:32:00 INFO     Loaded model from disk: 'D:\faceswap\LSS\3\realface.h5'
    12/04/2023 20:32:00 INFO     Loading Writer from Opencv plugin...
    
    12/04/2023 20:32:00 INFO     Loading Color from Avg_Color plugin...
    12/04/2023 20:32:00 INFO     Loading Scaling from Sharpen plugin...
    
    12/04/2023 20:34:04 INFO     -------------------------
    12/04/2023 20:34:04 INFO     Images found:        2946
    12/04/2023 20:34:04 INFO     Faces detected:      1671
    12/04/2023 20:34:04 INFO     -------------------------
    12/04/2023 20:34:04 INFO     Note:
    12/04/2023 20:34:04 INFO     Multiple faces were detected in one or more pictures.
    12/04/2023 20:34:04 INFO     Double check your results.
    12/04/2023 20:34:04 INFO     -------------------------
    12/04/2023 20:34:04 INFO     Process Succesfully Completed. Shutting Down...
Attachments
crash_report.2023.12.04.202616994062.log
(39.3 KiB) Downloaded 791 times
Last edited by torzdf on Mon Dec 04, 2023 1:18 pm, edited 2 times in total.
User avatar
torzdf
Posts: 2679
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 133 times
Been thanked: 625 times

Re: An unexpected crash has occurred(tools-preview), and cann't get a new video when using "convert"

Post by torzdf »

This happens because Conda-forge installs an unsupported version of ffmpeg. I have fixed this for fresh installs, but follow the instructions in this post to remedy the issue:
viewtopic.php?p=9716#p9716

My word is final

User avatar
wsyn470
Posts: 8
Joined: Mon Feb 13, 2023 4:46 am
Has thanked: 1 time

Re: An unexpected crash has occurred(tools-preview), and cann't get a new video when using "convert"

Post by wsyn470 »

Thanks. I read it and think it's not the same trouble with me. And I try these following actions(conda activate faceswap;conda install -c conda-forge "ffmpeg<5.0" -y )but nothing changed.

Code: Select all

Loading...
Setting Faceswap backend to NVIDIA
12/04/2023 23:16:14 INFO     Log level set to: INFO
12/04/2023 23:16:16 INFO     Input Video: D:\faceswap\LSS\a.mkv

12/04/2023 23:16:17 INFO     Reading alignments from: 'D:\faceswap\LSS\a_alignments_20231130_012544.fsa'
12/04/2023 23:16:17 INFO     Loading Model from Realface plugin...
12/04/2023 23:16:17 INFO     Using configuration saved in state file
12/04/2023 23:16:19 INFO     Loaded model from disk: 'D:\faceswap\LSS\3\realface.h5'
12/04/2023 23:16:23 ERROR    Got Exception on main handler:
Traceback (most recent call last):
  File "C:\Users\wsyn4\faceswap\lib\cli\launcher.py", line 224, in execute_script
    process = script(arguments)
  File "C:\Users\wsyn4\faceswap\tools\preview\preview.py", line 66, in __init__
    self._samples = Samples(self, arguments, 5)
  File "C:\Users\wsyn4\faceswap\tools\preview\preview.py", line 301, in __init__
    self.generate()
  File "C:\Users\wsyn4\faceswap\tools\preview\preview.py", line 402, in generate
    self._load_frames()
  File "C:\Users\wsyn4\faceswap\tools\preview\preview.py", line 421, in _load_frames
    image = self._images.load_one_image(self._filelist[selection])
  File "C:\Users\wsyn4\faceswap\scripts\fsmedia.py", line 322, in load_one_image
    retval = self._load_one_video_frame(int(frame_no))
  File "C:\Users\wsyn4\faceswap\scripts\fsmedia.py", line 343, in _load_one_video_frame
    frame = reader.get_next_data()[:, :, ::-1]  # type:ignore[index]
  File "C:\Users\wsyn4\anaconda3\envs\faceswap\lib\site-packages\imageio\core\format.py", line 448, in get_next_data
    return self.get_data(self._BaseReaderWriter_last_index + 1, **kwargs)
  File "C:\Users\wsyn4\anaconda3\envs\faceswap\lib\site-packages\imageio\core\format.py", line 435, in get_data
    im, meta = self._get_data(index, **kwargs)
  File "C:\Users\wsyn4\anaconda3\envs\faceswap\lib\site-packages\imageio\plugins\ffmpeg.py", line 408, in _get_data
    self._initialize(index)
  File "C:\Users\wsyn4\faceswap\lib\image.py", line 198, in _initialize
    starttime = index / self._meta["fps"]
ZeroDivisionError: division by zero
12/04/2023 23:16:23 CRITICAL An unexpected crash has occurred. Crash report written to 'C:\Users\wsyn4\faceswap\crash_report.2023.12.04.231620149194.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting

Process exited.
Last edited by torzdf on Mon Dec 04, 2023 3:52 pm, edited 1 time in total.
User avatar
torzdf
Posts: 2679
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 133 times
Been thanked: 625 times

Re: An unexpected crash has occurred(tools-preview), and cann't get a new video when using "convert"

Post by torzdf »

Can you provide the latest crash report please ('C:\Users\wsyn4\faceswap\crash_report.2023.12.04.231620149194.log)

My word is final

User avatar
wsyn470
Posts: 8
Joined: Mon Feb 13, 2023 4:46 am
Has thanked: 1 time

Re: An unexpected crash has occurred(tools-preview), and cann't get a new video when using "convert"

Post by wsyn470 »

OK. Thanks.

Attachments
crash_report.2023.12.04.231620149194.log
(39.32 KiB) Downloaded 799 times
User avatar
torzdf
Posts: 2679
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 133 times
Been thanked: 625 times

Re: An unexpected crash has occurred(tools-preview), and cann't get a new video when using "convert"

Post by torzdf »

Ok, so the ffmpeg downgrade went fine.

Is there a reason that you are using a backup version of the alignments file?

Code: Select all

-al D:/faceswap/LSS/a_alignments_20231130_012544.fsa

You should always be using the file named

Code: Select all

a_alignments.fsa

Unless you have a specific reason to be using an earlier backup, Even then, it is better practice to rename the backup file to the correct name.

Assuming this is an oversight on your part, try with the correct alignments file.

If this still doesn't work, then I will need a copy of:

  • a.mkv
  • a_alignments.fsa

to investigate further (you can put them on cloud storage and PM me the link)

Last edited by torzdf on Wed Dec 06, 2023 2:52 am, edited 1 time in total.

My word is final

Post Reply