Alignment files Bug

Getting errors or found a bug when converting faces from a trained model? Post about them here


Forum rules

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

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

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

User avatar
Barnuble
Posts: 17
Joined: Tue Jan 19, 2021 2:42 pm
Been thanked: 1 time

Alignment files Bug

Post by Barnuble »

Hi Everybody, Hi Torzdf,

It seems that the latest update brings a problem with alignment files : images (faces) not found during conversions : No alignment found for ********, skipping
Additionally, the manual tool no longer worked without specifying the relative alignment file since the penultimate update...

Another thing I noticed: during an update, the console displays an error installing a file : WARNING: Ignoring invalid distribution -pencv-python (c:\users\********\miniconda3\envs\faceswap\lib\site-packages)
(I assume it is OpenCV whose name is incorrect)

Full reinstallation didn't change anything !
Thank you again for the time you spend on Faceswap and for responding to all of us...

Last edited by Barnuble on Tue Apr 16, 2024 4:56 pm, edited 4 times in total.
User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Alignment files Bug

Post by torzdf »

Hmm, I've not hit either of these issues.

I will investigate tomorrow, but if you could provide reproducible steps, it would be appreciated.

My word is final

User avatar
alexbloch8
Posts: 20
Joined: Tue Nov 09, 2021 2:06 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by alexbloch8 »

Started happening to me as well. running with the latest faceswap version
it display " No alignment found for ********, skipping" until reaching the 1st face and then froze my pc (happened twice and resulted in windows blue screen of death with "Clock Watchdog Timeout" on my nvidia rtx 3060).
if there's any logs I can supply to help let me know! :)

User avatar
alexbloch8
Posts: 20
Joined: Tue Nov 09, 2021 2:06 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by alexbloch8 »

I've checked that the faces exist in the manual tool and saved a new allignment - didn't work
tried to convert a different video which I've already converted about a month ago - different video/allignment/modal - still got the same issue

User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Alignment files Bug

Post by torzdf »

The issue with converting should now be fixed.

Please update.

I cannot replicate the issue of auto-detecting alignment files with the manual tool, though it is possible that the convert fix also fixed this.

Last edited by torzdf on Wed Apr 17, 2024 11:40 am, edited 1 time in total.

My word is final

User avatar
alexbloch8
Posts: 20
Joined: Tue Nov 09, 2021 2:06 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by alexbloch8 »

fix confirmed - I am now able to convert again
thanks a lot for the quick response!!!!

User avatar
alexbloch8
Posts: 20
Joined: Tue Nov 09, 2021 2:06 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by alexbloch8 »

spoke too soon :cry:
3 minutes into convert got Clock Watchdog Timeout blue screen of death on win 11

User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Alignment files Bug

Post by torzdf »

alexbloch8 wrote: Wed Apr 17, 2024 12:29 pm

spoke too soon :cry:
3 minutes into convert got Clock Watchdog Timeout blue screen of death on win 11

Not sure that's related to be honest. All the fix did was update the keys to be correct in the alignments file. Everything else works the same.

My word is final

User avatar
Barnuble
Posts: 17
Joined: Tue Jan 19, 2021 2:42 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by Barnuble »

Hi,

A little feedback from my tests:

  • The conversion works again. Thanks!
  • On the other hand, the manual tool no longer launches at all (with or without alignment file specified)...
    I tested on two machines, whether with a new installation or not, manual tool don't launch.

Here's the message :

ERROR Got Exception on main handler:
Traceback (most recent call last):
File "C:\Users\user\faceswap\lib\cli\launcher.py", line 224, in execute_script
process = script(arguments)
File "C:\Users\user\faceswap\tools\manual\manual.py", line 80, in init
self._generate_thumbs(arguments.frames, arguments.thumb_regen, arguments.single_process)
File "C:\Users\user\faceswap\tools\manual\manual.py", line 174, in generate_thumbs
thumbs.generate_cache()
File "C:\Users\user\faceswap\tools\manual\thumbnails.py", line 111, in generate_cache
self.
check_and_raise_error()
File "C:\Users\user\faceswap\tools\manual\thumbnails.py", line 123, in check_and_raise_error
thread.check_and_raise_error()
File "C:\Users\user\faceswap\lib\multithreading.py", line 173, in check_and_raise_error
raise error[1].with_traceback(error[2])
File "C:\Users\user\faceswap\lib\multithreading.py", line 100, in run
self.
target(*self.args, **self.kwargs)
File "C:\Users\user\faceswap\tools\manual\thumbnails.py", line 217, in load_from_video
self.
set_thumbail(filename, frame[..., ::-1], frame_idx)
File "C:\Users\user\faceswap\tools\manual\thumbnails.py", line 294, in set_thumbail
self.
alignments.thumbnails.add_thumbnail(filename, face_idx, face.thumbnail)
File "C:\Users\user\faceswap\lib\align\alignments.py", line 861, in add_thumbnail
self._alignments_dict[frame]["faces"][face_index]["thumb"] = thumb

  • I still have a Warning in console : "WARNING: Ignoring invalid distribution -pencv-python" while updating, but this message does not appears on fresh install (only on old install)...

@alexbloch8 : I don't think your "blue screen of death" problem comes from alignment files problems, did you try to update display drivers ? or reinstalling FaceSwap ?

...

User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Alignment files Bug

Post by torzdf »

Barnuble wrote: Wed Apr 17, 2024 2:47 pm
  • On the other hand, the manual tool no longer launches at all (with or without alignment file specified)...
    I tested on two machines, whether with a new installation or not, manual tool don't launch.

I cannot recreate this. Can you zip up your source + alignments file, and DM with a download link so I can trigger the issue + fix it. (only used for recreating the bug, I have no interest in the actual contents)

My word is final

User avatar
Barnuble
Posts: 17
Joined: Tue Jan 19, 2021 2:42 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by Barnuble »

...

Can I make another request ?

Sometimes (not to say often), when I launch a new conversion, the first image that appears comes from the previous conversion and not from the current one...
It seems that at times the temporary image generated is not deleted from the disk at the end of the conversion and is taken into account for the next one, which forces me either to cancel and restart the conversion, or to delete the image before any conversion...

My request is: Would it be possible for the script to check that no temporary image is present before starting a conversion?... and to delete it if one existed?

Thanks again for everything you do ;)

User avatar
alexbloch8
Posts: 20
Joined: Tue Nov 09, 2021 2:06 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by alexbloch8 »

saw another update a couple of hours ago - after that all seems to be ok :D

User avatar
Barnuble
Posts: 17
Joined: Tue Jan 19, 2021 2:42 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by Barnuble »

Hi,

I cannot replicate the issue of auto-detecting alignment files with the manual tool, though it is possible that the convert fix also fixed this.

Convert fix worked, but auto detecting does not.

Can you zip up your source + alignments file, and DM with a download link so I can trigger the issue + fix it.

I am uploading the two files and will send you the link (source is very big and video codec is lossless (Lagarith Lossless))... Be patient ;(

Is it possible to add an option to disable caching before launching the manual tool? (it is between 20 and 30% of this operation that the error occurs).

Thanks

User avatar
MaxHunter
Posts: 194
Joined: Thu May 26, 2022 6:02 am
Has thanked: 177 times
Been thanked: 13 times

Re: Alignment files Bug

Post by MaxHunter »

Many but (interestingly enough) not all of my alignments are having these same issues.

It's weird it's so random.

I thought maybe it was the alignment update to 2.4 but just had video that had no issue after updating. 🤷

Last edited by MaxHunter on Thu Apr 18, 2024 12:32 am, edited 1 time in total.
User avatar
Amber
Posts: 1
Joined: Thu Apr 18, 2024 7:54 am

Re: Alignment files Bug

Post by Amber »

I am having the same issue but not during conversion, I'm trying to mask alignments that I had cleaned up with the manual tool. Previously extracted alignments keep having this issue. It started a couple days ago and I have been checking for updates daily and as of now (3:15 CST 4/18) it is up to date. I was able to mask one alignment I had previously been having the issue with after the update, but now everything else keeps doing it even after I get them updated to the new alignment version (the manual tool says it has updated the alignment file to 2.4). I've tried finding a work around such as running spatial which works on the alignment file but still getting the "Skipping frame not in alignments file:..." when trying to mask. I tried extracting the faces but get the same thing, so I can't mask by faces either. Any help is greatly appreciated, thank you.

User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Alignment files Bug

Post by torzdf »

Thanks @Barnuble for the test video + alignments file.

The following bugs I managed to identify and fix from this data:

  • Manual tool: crashes when creating thumbnails
  • Mask tool: Fails to find any frames to apply masks to
  • Preview tool: Not loading at all
  • Some other bits and pieces of code that may have caused similar issues elsewhere.

Please update, and hopefully all of the bugs reported here will now be fixed. If you happen to hit any related bugs (specifically Faceswap complaing that a video frame does not exist, when it does) then please let me know.

My word is final

User avatar
Barnuble
Posts: 17
Joined: Tue Jan 19, 2021 2:42 pm
Been thanked: 1 time

Re: Alignment files Bug

Post by Barnuble »

Hi,

I tested manual tool, masks and convert... all work perfectly !

Few more reports :

  • I still have the warning : "WARNING: Ignoring invalid distribution -pencv-python" when updating "old" installs but however everything seems to work fine !
  • Alignment tools needs alignment file to be specified to work.

Thanks again for everything ;)

Last edited by Barnuble on Thu Apr 18, 2024 7:17 pm, edited 1 time in total.
User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Alignment files Bug

Post by torzdf »

Barnuble wrote: Thu Apr 18, 2024 2:45 pm
  • I still have the warning : "WARNING: Ignoring invalid distribution -pencv-python" when updating "old" installs but however everything seems to work fine !

If everything works ok, don't worry about it. Probably just need a fresh environment

Barnuble wrote: Thu Apr 18, 2024 2:45 pm
  • Alignment tools needs alignment file to be specified to work.

Should be fixed in latest update

My word is final

User avatar
BrassNucks
Posts: 16
Joined: Wed Apr 10, 2024 2:26 am
Has thanked: 1 time
Been thanked: 3 times

Re: Alignment files Bug

Post by BrassNucks »

Trying to convert any previous extractions gives me 100% skipped frames due to:
...
No alignment found for abczyz_000263.mkv, skipping
No alignment found for abczyz_000264.mkv, skipping
No alignment found for abczyz_000265.mkv, skipping
No alignment found for abczyz_000266.mkv, skipping
...
Note that it's looking for sequentially numbered .mkv files though they should be .png as they've been extracted.

I have not yet tried on a brand new extraction (i.e. from today's update) but I'm dreading having to re-extract and re-align every video from the past.

It is the absolute latest version available:
git_branch: master
git_commits: dce7d98

User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Alignment files Bug

Post by torzdf »

BrassNucks wrote: Fri Apr 19, 2024 10:57 pm

Note that it's looking for sequentially numbered .mkv files though they should be .png as they've been extracted.

I have not yet tried on a brand new extraction (i.e. from today's update) but I'm dreading having to re-extract and re-align every video from the past.

That's not what it is doing....

It's long and wordy to explain why this issue existed in the first place, but for 'reasons' frames were stored in the alignments file (from video) as the video name followed by the frame number followed by ".png".

The change has changed from appending .png to the end of the key lookup to appending the extension of the video file.

There are good reasons for this, but beyond some regressions I missed (and have fixed) there should be no change in work flow.

If you still have issues, please provide me with:

  • A source video + alignments file that causes your issue
  • The steps required to repeat your issue

I can then issue a fix.

Unfortunately, I cannot fix what I cannot recreate.

My word is final

Post Reply