Error importing tensorflow

Installing and setting up FaceSwap


Forum rules

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

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

Locked
User avatar
Will999
Posts: 4
Joined: Wed Sep 06, 2023 2:38 pm

Error importing tensorflow

Post by Will999 »

Hello, I installed Faceswap on a fresh install of Ubuntu 22.04. The installation completed without any errors. I did install rocm prior to installing faceswap. My gpu is the rx6750xt.

When attempting to start faceswap I get the following error:

bob@bobby:~$ cd faceswap/
bob@bobby:~/faceswap$ conda activate faceswap
(faceswap) bob@bobby:~/faceswap$ python faceswap.py gui
Setting Faceswap backend to ROCM
09/06/2023 10:35:28 INFO Log level set to: INFO
09/06/2023 10:35:28 ERROR There was an error importing Tensorflow. This is most likely because you do not have TensorFlow installed, or you are trying to run tensorflow-gpu on a system without an Nvidia graphics card. Original import error: libhsa-runtime64.so.1: cannot open shared object file: No such file or directory

Any help would be appreciated.

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

Re: Error importing tensorflow

Post by torzdf »

This looks like a ROCm specific issue. Sadly, I am unable to test the ROCm setup as I do not have a compatible GPU. If you do find the solution though, please post back to help other users.

My word is final

User avatar
Will999
Posts: 4
Joined: Wed Sep 06, 2023 2:38 pm

Re: Error importing tensorflow

Post by Will999 »

I missed the part in the installation instructions about tensorflow requiring a specific version of rocm. I had installed the default version 5.6. I uninstalled rocm (apt autoremove rocm-core) and then installed version 5.3 and now it works.

User avatar
Will999
Posts: 4
Joined: Wed Sep 06, 2023 2:38 pm

Re: Error importing tensorflow

Post by Will999 »

After further tinkering it seems the rx6750xt is not supported by rocm. Sigh... guess i'll have to install windows

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

Re: Error importing tensorflow

Post by torzdf »

Yeah, that sucks :(

ROCm really is a bit of a pain at the moment, but I hope it improves over time. I have an old AMD GPU kicking around that I wanted to use for testing ROCm, but, similarly, I found it was not supported.

Thanks for the update.

My word is final

Locked