Manual Tool Can't Save - Index Out of Range

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
helpimbeing
Posts: 6
Joined: Mon May 04, 2020 2:22 am
Has thanked: 1 time

Manual Tool Can't Save - Index Out of Range

Post by helpimbeing »

I keep getting the following error when attempting to save in the Manual tool. It doesn't happen every time but it's very frequent. Sometimes enabling Single Process and Thumb Regen solves it but it's not consistent.

I saw this thread on the topic: I made sure I am entering my alignment file and the corresponding video from which the faces and alignments were extracted, and I am definitely not deleting faces during the extraction process.

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\user\MiniConda3\envs\faceswap\lib\tkinter\__init__.py", line 1892, in call
return self.func(*args)
File "C:\Users\user\faceswap\tools\manual\detected_faces.py", line 144, in save
self.children["io"].save()
File "C:\Users\user\faceswap\tools\manual\detected_faces.py", line 284, in save
frame = self.
sorted_frame_names[idx]
IndexError: list index out of range

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

Re: Manual Tool Can't Save - Index Out of Range

Post by torzdf »

I'd need recreatable examples to be able to look into this.

Either way, I'm not going to have time for a few weeks I'm afraid.

My word is final

User avatar
Replicon
Posts: 50
Joined: Mon Mar 22, 2021 4:24 pm
Been thanked: 2 times

Re: Manual Tool Can't Save - Index Out of Range

Post by Replicon »

I can reproduce this as well. I've started to notice this happening when the clip was extracted with een > 1.

I don't know for certain if that's related. I haven't updated the software in a little bit, but I've recently started doing higher een on the initial extraction, and have started running into these indexing issues.

What's worse, this seems to corrupt alignment files. Like, after if hit the "can't save" state, I'll close the manual tool and rerun, hoping I can pick up where I left off, but at some point, things get corrupted, with faces and alignments not showing up correctly.

In my last attempt, I had een=4 on the extract, and in the thumbnails, I could see every fourth thumb was the incorrect picture. I think there are multiple indexes being kept track of, and one of them does not respect een. Or maybe something treats an index based on total frames as if it were "has faces", and results in reading past the end of the list.

User avatar
CarlosZcat
Posts: 4
Joined: Tue Dec 01, 2020 4:43 am
Has thanked: 4 times

Re: Manual Tool Can't Save - Index Out of Range

Post by CarlosZcat »

I seem to get this error as well.

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

Re: Manual Tool Can't Save - Index Out of Range

Post by torzdf »

Tagged with 'bug'. Will look when I have a chance

My word is final

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

Re: Manual Tool Can't Save - Index Out of Range

Post by torzdf »

Ok, it has taken me a while to look at this, but I believe this bug is now fixed.

The issue was with EEN > 1. The manual tool was never designed with this in mind. Basically the issue would appear the first time an alignments file with EEN > 1 was loaded into the manual tool. At this point the manual tool scans the incoming video, it then embeds the timestamps into the alignments file. This would add additional frames to the alignments file which did not previously exist (a necessity as timestamps need to be associated with frames regardless of whether the frame has faces or not).

The issue has been solved by recalculating the total frame count after the timestamps have been scanned and written.

This issue has only been resolved for Video files. I have not investigated folders of images.

My word is final

Locked