Page 1 of 1

[Tip] De-uglyfying Faceswap under Linux

Posted: Thu Dec 10, 2020 3:23 pm
by torzdf
 ! Message from: torzdf

Faceswap now installs a version of TK that displays fonts correctly. If you are still having display issues under Linux, you should reinstall faceswap

The instructions below are now obsolete, and should only be used as a measure of last resort

If you have installed Faceswap under Linux using the provided installer script, chances are that the fonts look ugly as all hell:

ugly.png
ugly.png (34.03 KiB) Viewed 37233 times

This is because Anaconda does not build TK with certain required libraries (for reference: https://github.com/ContinuumIO/anaconda ... ssues/6833)

There is a work around to fix this. It's a little hacky, but does work. I provide instructions below for Ububtu 20.04, but this should work for all Linux flavors with a slight change in commands to use your package manager.

  1. Firstly install tkinter for Python 3 for your system (amend this to the package name for tkinter and the installer for your distro if not using Ubuntu):

    Code: Select all

    sudo apt install python3-tk
    
  2. FInd where your system installs the library files for tkinter. For ubuntu this will be under /usr/lib/x86_64-linux-gnu/ You can locate the file with the following command:

    Code: Select all

    sudo find / -name libtk8.6.so
    
  3. Navigate to the library folder for your Faceswap Conda environment. The default location will be ~/miniconda3/envs/faceswap/lib so amend the below if you did not install Miniconda in the default location:

    Code: Select all

    cd ~/miniconda3/envs/faceswap/lib
    
  4. Backup the existing tkinter library file:

    Code: Select all

    mv libtk8.6.so libtk8.6.so.bk
    
  5. Finally create a symlink to you system tkinter library file. Make sure you amend the path below to the one you found in step 2:

    Code: Select all

    sudo ln -s /usr/lib/x86_64-linux-gnu/libtk8.6.so libtk8.6.so
    

Bask in your new found readability:

pretty.png
pretty.png (66.16 KiB) Viewed 37233 times

Re: [Tip] De-uglyfying Faceswap under Linux

Posted: Wed Dec 30, 2020 1:12 am
by tokafondo

Definitely works!! Thanks!!


Re: [Tip] De-uglyfying Faceswap under Linux

Posted: Tue Jan 05, 2021 5:52 pm
by isokosan

Works great! Thank you, looks way better.


Re: [Tip] De-uglyfying Faceswap under Linux

Posted: Fri Oct 22, 2021 5:21 pm
by CarlosZcat

I followed these instructions carefully and it resulted in failing to start. I had no problems doing this in Linux Mint.

OS = Lubuntu 19.04 Disco Dingo

uname -a

5.11.0-38-generic #4220.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

python3 --version

Python 3.8.10

I just switched from Mint to Lubunto however, the Gui in Faceswap is really ugly and the fonts are very tiny.


Re: [Tip] De-uglyfying Faceswap under Linux

Posted: Mon Nov 08, 2021 11:33 am
by torzdf

That should work, so not sure why it hasn't, to be honest. Mine is tested working on Ubuntu 20.04