Error generating mask due to invalid tensor format fp32

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.

Post Reply
User avatar
master_of_disaster
Posts: 5
Joined: Sat Apr 16, 2022 4:28 pm

Error generating mask due to invalid tensor format fp32

Post by master_of_disaster »

I am on a M1 MacBook and trying to run the mask tool using the following command:

Code: Select all

python ~/faceswap/tools.py mask -i . -it frames -M bisenet-fp -p missing -b 3 -t 4 -ot combined -L INFO -B

And it throws a bunch of these errors for each file processed:

Code: Select all

loc("mps_resize"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/0032d1ee-80fd-11ee-8227-6aecfccc70fe/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":180:0)): error: 'anec.resize' op Invalid configuration for the following reasons: Error: Invalid tensor format: "fp32"

It seems like the images are being properly masked, but maybe it's dropping the ones where this error is encountered? Is this safe to ignore?

User avatar
torzdf
Posts: 2752
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 141 times
Been thanked: 643 times

Re: Error generating mask due to invalid tensor format fp32

Post by torzdf »

This is a bug in Tensorflow-Metal (Apple's plugin layer) so is upstream from us. Ultimately "Invalid tensor format: "fp32" doesn't make a lot of sense. Nearly all tenors are fp32!

If you are getting full output, then do not worry about it too much. If not, then there may be bigger issues.

I seem to remember another Mac user hitting this issue... may have been in this forum, our Discord or may have been on our github, I can't remember. I do seem to remember that the issue was a combination of his OS version and the Tensorflow-Metal plugin version we use, as I think the issue occurred after an OS upgrade.

Unfortunately we are stuck on the Tensorflow-Metal version we are on for now until we find a solve for Windows users to use more recent versions of Tensorflow.

My word is final

User avatar
macktmo
Posts: 3
Joined: Mon May 08, 2023 1:01 am
Has thanked: 3 times

Re: Error generating mask due to invalid tensor format fp32

Post by macktmo »

Hello. Is there still a possibility that this will be resolved for macOS users? Is this just like a fix where users need to install a patch or software update (if there will be any) or is this a hardware issue?

I would like to start over again and I'll just try to leave the output for now. Hope there's no issue aside from it showing an error message. :)

User avatar
torzdf
Posts: 2752
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 141 times
Been thanked: 643 times

Re: Error generating mask due to invalid tensor format fp32

Post by torzdf »

There are upcoming changes that will hopefully address this. Keep an eye out for an announcement in the coming week or so

My word is final

Post Reply