[Guide] macOS Install Guide: Installer Method

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.

User avatar
lev12354
Posts: 7
Joined: Thu Aug 31, 2023 1:16 pm
Has thanked: 3 times
Been thanked: 1 time

Re: [Guide] macOS Install Guide: Installer Method

Post by lev12354 »

torzdf wrote: Fri Sep 01, 2023 10:59 am

GPU is used for training/extract/convert etc.

If you run with loglevel VERBOSE then you should get an output from Tensorflow saying which device it is using

Good afternoon, I managed to get the GPU to work as well. I installed miniconda3 for x86-64 platform, but the config to install faceswap I used Apple Silicon. And now the video card is involved in the processing.

User avatar
torzdf
Posts: 2520
Joined: Fri Jul 12, 2019 12:53 am
Answers: 149
Has thanked: 125 times
Been thanked: 576 times

Re: [Guide] macOS Install Guide: Installer Method

Post by torzdf »

So you selected "APPLE-SILICON" using the install script and it just worked?

If so, I will update the instructions to reflect this for other x64/AMD users

My word is final

User avatar
torzdf
Posts: 2520
Joined: Fri Jul 12, 2019 12:53 am
Answers: 149
Has thanked: 125 times
Been thanked: 576 times

Re: [Guide] macOS Install Guide: Installer Method

Post by torzdf »

hullo wrote: Sat Sep 02, 2023 7:15 am

And now the hard part. Tiny black font against dark gray background. :shock:

There is some control over font size etc in Settings > GUI settings.

If you can't read the items here, then you can also edit this in the file ~/faceswap/config/gui.ini

My word is final

User avatar
adriadg
Posts: 8
Joined: Sat Sep 02, 2023 10:32 am
Has thanked: 3 times

Re: [Guide] macOS Install Guide: Installer Method

Post by adriadg »

Hi!

I am trying to install in my Macbook Pro M1pro, but something goes wrong because there is no app file in the desktop.

I tried to install again, attached find the terminal log, anyone could help me to find the problem to fix it?

Thnks in advance!

Code: Select all

Last login: Sat Sep  2 12:15:55 on ttys000
adrideugelabert@MacBook-Pro-de-Adri ~ % conda activate faceswap
cd faceswap
python faceswap.py gui
cd: no such file or directory: faceswap
python: can't open file '/Users/adria/faceswap.py': [Errno 2] No such file or directory
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % conda activate faceswap
cd faceswap
python faceswap.py gui ./miniconda3
cd: no such file or directory: faceswap
python: can't open file '/Users/adria/faceswap.py': [Errno 2] No such file or directory
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % ./miniconda 
zsh: no such file or directory: ./miniconda
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % faceswap_setup_macos.sh
zsh: command not found: faceswap_setup_macos.sh
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % bash ./downloads/faceswap_setup_macos.sh
                         001
                        11 10  010
               @@@@      10
            @@@@@@@@         00     1
          @@@@@@@@@@  1  1            0
        @@@@@@@@    0000 01111
       @@@@@@@@@@    01  110 01  1
      @@@@@@@@@@@@ 111    010    0
      @@@@@@@@@@@@@@@@  10    0
      @@@@@@@@@@@@@   0010   1
      @@@@@@@@@  @@@   100         1
      @@@@@@@ .@@@@  10       1
       #@@@@@@@@@@@  001       0
         @@@@@@@@@@@  ,
         @@@@@@@@  @@@@@
        @@@@@@@@ @@@@@@@@    _
       @@@@@@@@@,@@@@@@@@  / _|
       %@@@@@@@@@@@@@@@@@ | |_  ___ 
           @@@@@@@@@@@@@@ |  _|/ __|
            @@@@@@@@@@@@  | |  \__ \
             @@@@@@@@@@(  |_|  |___/
                @@@@@@
                 @@@@

================ Welcome to the macOS Faceswap Installer ================
INFO    To get setup we need to gather some information about where you would
INFO    like Faceswap and Conda to be installed.
INFO    To accept the default values just hit the 'ENTER' key for each option.
INFO    You will have an opportunity to review your responses prior to
INFO    commencing the install.

INFO    IMPORTANT: Make sure that the user 'adrideugelabert' has full
INFO    permissions for all of the destinations that you select.
Press 'ENTER' to continue with the setup...

================================= CONDA =================================
INFO    Faceswap uses Conda as it handles the installation of all
INFO    prerequisites.
INFO    Found existing conda install at: /Users/adria/miniconda3
Use the pre installed conda? [YES/no]: n

INFO    If you have an existing Conda install then enter the location here,
INFO    otherwise Miniconda3 will be installed in the given location.
Please specify a location for Conda. [default: '/Users/adria/miniconda3']: 

INFO    Faceswap will be installed inside a Conda Environment. If an
INFO    environment already exists with the name specified then it will be
INFO    deleted.
Please specify a name for the Faceswap Conda Environmnet [default: 'faceswap']: 

================================ FACESWAP ================================
INFO    Faceswap will be installed in the given location. If a folder exists
INFO    at the location you specify, then it will be deleted.
Please specify a location for Faceswap [default: '/Users/adria/faceswap']: 

INFO    Faceswap can be run on Apple Silicon (M1, M2 etc.), compatible NVIDIA
INFO    gpus, or on CPU. You should make sure that any drivers are up to
INFO    date. Please select the version of Faceswap you wish to install.
Select:	1: Apple Silicon
	2: NVIDIA
	3: CPU
Invalid selection.
Select:	1: Apple Silicon
	2: NVIDIA
	3: CPU


======================= POST INSTALLATION ACTIONS =======================
INFO    Launching Faceswap requires activating your Conda Environment and then
INFO    running Faceswap. The installer can simplify this by creating an
INFO    Application Launcher file and placing it on your desktop to launch
INFO    straight into the Faceswap GUI
Create FaceswapGUI Launcher? [YES/no]: y

========================= Review install options =========================
INFO    Please review the selected installation options before proceeding:

    - Existing Conda install at '/Users/adria/miniconda3' will be used
    - Existing Conda Environment faceswap  will be removed
    - Conda Environment 'faceswap' will be created.
    - Faceswap will be installed in '/Users/adria/faceswap'
    - Installing for 'apple_silicon'
    - An Application Launcher will be created
Do you wish to continue? [yes/NO]: y
INFO    Removing pre-existing Virtual Environment


CondaEnvironmentError: cannot remove current environment. deactivate and run conda remove again

INFO    Creating Conda Virtual Environment...

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/adria/miniconda3/envs/faceswap

  added / updated specs:
    - python=3.10


The following NEW packages will be INSTALLED:

  bzip2              pkgs/main/osx-arm64::bzip2-1.0.8-h620ffc9_4 
  ca-certificates    pkgs/main/osx-arm64::ca-certificates-2023.05.30-hca03da5_0 
  libffi             pkgs/main/osx-arm64::libffi-3.4.4-hca03da5_0 
  ncurses            pkgs/main/osx-arm64::ncurses-6.4-h313beb8_0 
  openssl            pkgs/main/osx-arm64::openssl-3.0.10-h1a28f6b_2 
  pip                pkgs/main/osx-arm64::pip-23.2.1-py310hca03da5_0 
  python             pkgs/main/osx-arm64::python-3.10.12-hb885b13_0 
  readline           pkgs/main/osx-arm64::readline-8.2-h1a28f6b_0 
  setuptools         pkgs/main/osx-arm64::setuptools-68.0.0-py310hca03da5_0 
  sqlite             pkgs/main/osx-arm64::sqlite-3.41.2-h80987f9_0 
  tk                 pkgs/main/osx-arm64::tk-8.6.12-hb8d0fd4_0 
  tzdata             pkgs/main/noarch::tzdata-2023c-h04d1e81_0 
  wheel              pkgs/main/osx-arm64::wheel-0.38.4-py310hca03da5_0 
  xz                 pkgs/main/osx-arm64::xz-5.4.2-h80987f9_0 
  zlib               pkgs/main/osx-arm64::zlib-1.2.13-h5a0b063_0 


Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
INFO    Downloading Faceswap...

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
INFO    Setting up Faceswap...
python: can't open file '/Users/adria/faceswap/setup.py': [Errno 2] No such file or directory
./downloads/faceswap_setup_macos.sh: line 449: /Users/adria/faceswap/faceswap_gui_launcher.command: No such file or directory
chmod: /Users/adria/faceswap/faceswap_gui_launcher.command: No such file or directory
unzip:  cannot find or open /Users/adria/faceswap/.install/macos/app.zip, /Users/adria/faceswap/.install/macos/app.zip.zip or /Users/adria/faceswap/.install/macos/app.zip.ZIP.
./downloads/faceswap_setup_macos.sh: line 463: /var/folders/zw/wkql2zsn1r7g3vcvbr_hcwfr0000gn/T/tmp.G5mkokOm/FaceswapGUI.app/Contents/Resources/script: No such file or directory
chmod: /var/folders/zw/wkql2zsn1r7g3vcvbr_hcwfr0000gn/T/tmp.G5mkokOm/FaceswapGUI.app/Contents/Resources/script: No such file or directory
mv: rename /var/folders/zw/wkql2zsn1r7g3vcvbr_hcwfr0000gn/T/tmp.G5mkokOm/FaceswapGUI.app to /Users/adria/Desktop/FaceswapGUI.app: No such file or directory
INFO    Faceswap installation is complete!
INFO    You can launch Faceswap from the icon on your desktop
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % conda activate faceswap
cd faceswap
python faceswap.py gui
cd: no such file or directory: faceswap
python: can't open file '/Users/adria/faceswap.py': [Errno 2] No such file or directory
(faceswap) adrideugelabert@MacBook-Pro-de-Adri ~ % 

User avatar
lev12354
Posts: 7
Joined: Thu Aug 31, 2023 1:16 pm
Has thanked: 3 times
Been thanked: 1 time

Re: [Guide] macOS Install Guide: Installer Method

Post by lev12354 »

torzdf wrote: Sat Sep 02, 2023 10:26 am

So you selected "APPLE-SILICON" using the install script and it just worked?

If so, I will update the instructions to reflect this for other x64/AMD users

Yes, that's correct. But I don't understand if 30-50 iterations per 2 minutes is the norm when using Dlight with default functions?

But also in your script for macos I changed the conda installation type from Arm64 to x86-64. Otherwise the conda was not working correctly

Last edited by lev12354 on Sat Sep 02, 2023 10:45 am, edited 1 time in total.
User avatar
torzdf
Posts: 2520
Joined: Fri Jul 12, 2019 12:53 am
Answers: 149
Has thanked: 125 times
Been thanked: 576 times

Re: [Guide] macOS Install Guide: Installer Method

Post by torzdf »

lev12354 wrote: Sat Sep 02, 2023 10:44 am

Yes, that's correct. But I don't understand if 30-50 iterations per 2 minutes is the norm when using Dlight with default functions?

Ok, that's great. Thanks for confirming.

I can't comment on the speed as I can't benchmark it. You are probably best off in opening a new topic in Training Discussion

lev12354 wrote: Sat Sep 02, 2023 10:44 am

But also in your script for macos I changed the conda installation type from Arm64 to x86-64. Otherwise the conda was not working correctly

Yes, that is an oversight on my part. I will see if there is a way to make this selectable in the installer

Last edited by torzdf on Sat Sep 02, 2023 10:49 am, edited 1 time in total.

My word is final

User avatar
torzdf
Posts: 2520
Joined: Fri Jul 12, 2019 12:53 am
Answers: 149
Has thanked: 125 times
Been thanked: 576 times

Re: [Guide] macOS Install Guide: Installer Method

Post by torzdf »

adriadg wrote: Sat Sep 02, 2023 10:37 am

I am trying to install in my Macbook Pro M1pro, but something goes wrong because there is no app file in the desktop.

Code: Select all


xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

There is an issue with your XCode install. See here for further info: https://apple.stackexchange.com/questio ... -use-git-a

My word is final

User avatar
adriadg
Posts: 8
Joined: Sat Sep 02, 2023 10:32 am
Has thanked: 3 times

Re: [Guide] macOS Install Guide: Installer Method

Post by adriadg »

you are right, now it works!

Thanks

User avatar
hullo
Posts: 7
Joined: Wed Aug 23, 2023 8:30 am

Re: [Guide] macOS Install Guide: Installer Method

Post by hullo »

torzdf wrote: Sat Sep 02, 2023 10:31 am

There is some control over font size etc in Settings > GUI settings.

If you can't read the items here, then you can also edit this in the file ~/faceswap/config/gui.ini

There doesn't seem to be a way to change font color but I stumbled on a quirk: opening the settings window or switching to another app with Faceswap in the background changes the font color to white which is much easier to read. (Dark gray background stays the same.)

Post Reply