Page 1 of 3

Alignment files Bug

Posted: Tue Apr 16, 2024 4:36 pm
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...


Re: Alignment files Bug

Posted: Tue Apr 16, 2024 5:47 pm
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.


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 2:51 am
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! :)


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 5:50 am
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


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 11:38 am
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.


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 12:23 pm
by alexbloch8

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


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 12:29 pm
by alexbloch8

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


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 12:33 pm
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.


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 2:47 pm
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 ?

...


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 2:59 pm
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)


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 3:11 pm
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 ;)


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 4:28 pm
by alexbloch8

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


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 4:48 pm
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


Re: Alignment files Bug

Posted: Wed Apr 17, 2024 11:09 pm
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. 🤷


Re: Alignment files Bug

Posted: Thu Apr 18, 2024 8:14 am
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.


Re: Alignment files Bug

Posted: Thu Apr 18, 2024 11:50 am
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.


Re: Alignment files Bug

Posted: Thu Apr 18, 2024 2:45 pm
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 ;)


Re: Alignment files Bug

Posted: Fri Apr 19, 2024 10:40 am
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


Re: Alignment files Bug

Posted: Fri Apr 19, 2024 10:57 pm
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


Re: Alignment files Bug

Posted: Sun Apr 21, 2024 2:49 pm
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.