Page 1 of 1

Error generating mask due to invalid tensor format fp32

Posted: Sun Feb 18, 2024 7:36 pm
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?


Re: Error generating mask due to invalid tensor format fp32

Posted: Tue Feb 20, 2024 1:56 am
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.