Manual Tool isn't saving alignments file

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
xathriiley
Posts: 4
Joined: Tue Mar 07, 2023 7:41 pm
Has thanked: 1 time
Been thanked: 1 time

Manual Tool isn't saving alignments file

Post by xathriiley »

hi, i'm new to all this and i'm having a problem. i've been trying to manually adjust alignments, but the manual tool isn't saving the alignments file. i've readjusted the same frames half a dozen times but when i save and close and reopen the tool all my work is lost. the terminal pane in faceswap shows this text when i try to save:

Code: Select all

Exception in Tkinter callback
Traceback (most recent call last):
File "/home/(my name/miniconda3/envs/faceswap/lib/python3.9/tkinter/__init__. py", line 1892, in __call__
return self.func(*args)
File "/home/(my name)/faceswap/tools/manual/detected_faces. py", line 144, in save
self._children["io"].save()
File "/home/(my name)/faceswap/tools/manual/detected_faces. py", line 286, in save
for idx, faces in zip(frames, np.array(self._frame_faces)[np.array(frames)]):
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (8386,) + inhomogeneous part.

idk if this is pertinent but i'm on linux. does anyone know how to fix this?
PS idk if i'm in the right section of the forum, i put this in extraction help because that step is in the extraction section of the guides.

Last edited by torzdf on Thu Mar 09, 2023 12:22 pm, edited 1 time in total.
User avatar
torzdf
Posts: 2636
Joined: Fri Jul 12, 2019 12:53 am
Answers: 156
Has thanked: 128 times
Been thanked: 614 times

Re: Manual Tool isn't saving alignments file

Post by torzdf »

The error message is related, yes. It's not one I've seen before though and suggests a bug (that I am unlikely to be able to fix if I can't recreate it, sadly).

If you see that error display, then assume you will no longer be able to save alignments, so close and re-open the tool.

Try doing 1 edit + saving first. If that works, fix 1 frame, and save, then move on. If you get the error straight away (on saving on the first edit/frame), then please posts the steps you are taking here.

My word is final

User avatar
xathriiley
Posts: 4
Joined: Tue Mar 07, 2023 7:41 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Manual Tool isn't saving alignments file

Post by xathriiley »

Okay, so i closed the entire program, restarted my computer, then launched Faceswap again from the executable shortcut on my desktop. i navigated to the Manual section of the Tools tab, set the filepaths to a different alignments file from the one that wasn't saving earlier and the corresponding mp4 (i've also had this same problem with a folder of frames rendered via the effmpeg tool). I enabled single process because my gpu isn't great, left everything else alone, and hit the launch button. when the tool window popped up i edited the landmarks on a couple faces that were partially obscured that i could find again later, and hit save. it spat out the same set of errors in the terminal pane of the main program window, upon exiting and reloading those couple edits i made were lost.

i did a bit more googling today and i think the problem is that last line,
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. etc
someone else on here was having the tkinter exception but it seemingly wasn't affecting their work at all. but i noticed that every time i get that valueerror on an array it quotes the 'detected shape' as being one integer higher than the total number of frames in the source. if the source video has 8119 frames, for example, it says "the detected shape was (8120,) + inhomogenous part."
i tried googling that and all the results were for NumPy, so i guess tonight i'll be trying to learn about that and these arrays. oh that reminds me, the arrays used in these alignments are 2D, right? because the array valueerror always says inhomogenous shape detected after 1 dimension.
anyway, i appreciate the assistance, and those guides are fantastic. when i first skimmed them i had no clue what i was looking at, but after working through them with the program i've learned so much. this new tech is wild.

User avatar
torzdf
Posts: 2636
Joined: Fri Jul 12, 2019 12:53 am
Answers: 156
Has thanked: 128 times
Been thanked: 614 times

Re: Manual Tool isn't saving alignments file

Post by torzdf »

The specific error is unlikely to be something that you will be able to solve (it is likely coming from deep inside the code, rather than anything you will be likely to issue a quick fix for).

If you can share your source + alignments file (zipped up of G-Drive or somewhere) I can see if I can recreate + fix the bug. You can DM me with any link. I will only be using the source to track down the bug, I'll then be deleting it.

My word is final

User avatar
xathriiley
Posts: 4
Joined: Tue Mar 07, 2023 7:41 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Manual Tool isn't saving alignments file

Post by xathriiley »

Okay, delayed update. my pc went no POST for a bit and one of my hard drives failed (the one with all my faceswap data on it, of course) but long story short i fixed it and switched back to Linux Mint instead of Ubuntu and now the manual tool is saving perfectly fine. i still have no idea why i was getting that error or why i'm not now, but i'm pretty sure the problem was with my pc or os, and probably extremely rare. lol now i just have to do aaall the extractions and training again, but now that i can actually use the manual tool i'm sure i'll get much better results.

User avatar
torzdf
Posts: 2636
Joined: Fri Jul 12, 2019 12:53 am
Answers: 156
Has thanked: 128 times
Been thanked: 614 times

Re: Manual Tool isn't saving alignments file

Post by torzdf »

That's good to hear. As you've probably gathered, I haven't had a chance to investigate the data you sent me, but seeing as it all appears to be working, I will shelve that for now.

My word is final

User avatar
xathriiley
Posts: 4
Joined: Tue Mar 07, 2023 7:41 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Manual Tool isn't saving alignments file

Post by xathriiley »

Yeah, no worries. in browsing these forums i noticed that not only did you write the guides, but also seem to be nearly the only person addressing the weirder bugs so i figured you had a pretty full plate. i really appreciate everything you do around here and your willingness to try to help me even if it's apparently resolved itself.

Locked