Faceswap 3 open for testing

Discussions about research, Faceswapping and things that don't fit in the other categories here.


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

Re: Faceswap 3 open for testing

Post by torzdf »

@ianstephens Thanks for testing. Unfortunately I have been very busy of late, so not much time for development.

I have made a note of your feedback and will investigate as soon as I get an opportunity.

My word is final

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

Re: Faceswap 3 open for testing

Post by torzdf »

teskki wrote: Sun Sep 29, 2024 8:02 am

Hi I need help with this installation process... I tried installing the Faceswap 3 on my kali linux and this is what am getting

(base) ┌──(tejiri㉿kali)-[~]
└─$ git clone https://github.com/deepfakes/faceswap.git fs3
Cloning into 'fs3'...
remote: Enumerating objects: 14675, done.
remote: Counting objects: 100% (1062/1062), done.
remote: Compressing objects: 100% (624/624), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: 4480 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

This is a network connection issue. It looks like your ISP is cutting off your connection before the download completes.

You can try either:

  • Using an internet connection elsewhere
  • Trying to enable a VPN (sometimes works for this issue)

My word is final

User avatar
Ryzen1988
Posts: 59
Joined: Thu Aug 11, 2022 8:31 am
Location: Netherlands
Has thanked: 8 times
Been thanked: 28 times

Re: Faceswap 3 open for testing

Post by Ryzen1988 »

Hey wow, am i late to the party, damn. But it gives me this strange error because torchvision is already installed. I added crash report
All other masks besides BiSeNet seem to work perfect

Nevermind, fixed it by uninstalling and reinstalling different toch, now version 2.3.0

Initialized: BiSeNet
ImportError: Exception encountered when calling UpSampling2D.call().

[1mThe torchvision package is necessary to use resize with the torch backend. Please install torchvision.[0m

Arguments received by UpSampling2D.call():
• inputs=torch.Tensor(shape=torch.Size([8, 32, 32, 5]), dtype=float32)

On a more cheerful note, the manual tool feels a lot quicker and a bit more robuust. :D really looking forward to try out the new convnext and the new AdamW optimizer.

Attachments
crash_report.2024.11.16.234045270882.log
(46.96 KiB) Downloaded 2822 times
Last edited by Ryzen1988 on Sun Nov 17, 2024 10:28 am, edited 5 times in total.
User avatar
Ryzen1988
Posts: 59
Joined: Thu Aug 11, 2022 8:31 am
Location: Netherlands
Has thanked: 8 times
Been thanked: 28 times

Re: Faceswap 3 open for testing

Post by Ryzen1988 »

Have some errors that appear when trying to train a model

Code: Select all

C:\Users\Admin\.conda\envs\fs3\Lib\site-packages\keras\src\backend\torch\nn.py:416: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ..\aten\src\ATen\native\cudnn\Conv_v8.cpp:919.)
outputs = tnn.conv2d(
C:\Users\Admin\.conda\envs\fs3\Lib\site-packages\keras\src\backend\torch\nn.py:416: UserWarning: Using padding='same' with even kernel lengths and odd dilation may require a zero-padded copy of the input be created (Triggered internally at ..\aten\src\ATen\native\Convolution.cpp:1032.)
outputs = tnn.conv2d(
C:\Users\Admin\.conda\envs\fs3\Lib\site-packages\torch\autograd\graph.py:744: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ..\aten\src\ATen\native\cudnn\Conv_v8.cpp:919.)
return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
User avatar
Playstation5fanatic
Posts: 1
Joined: Mon Dec 23, 2024 2:26 pm

Re: Faceswap 3 open for testing

Post by Playstation5fanatic »

Ryzen1988 wrote: Sat Nov 16, 2024 10:47 pm

Hey wow, am i late to the party, damn. But it gives me this strange error because torchvision is already installed. I added crash report
All other masks besides BiSeNet seem to work perfect

Nevermind, fixed it by uninstalling and reinstalling different toch, now version 2.3.0

Initialized: BiSeNet
ImportError: Exception encountered when calling UpSampling2D.call().

[1mThe torchvision package is necessary to use resize with the torch backend. Please install torchvision.[0m

Arguments received by UpSampling2D.call():
• inputs=torch.Tensor(shape=torch.Size([8, 32, 32, 5]), dtype=float32)

On a more cheerful note, the manual tool feels a lot quicker and a bit more robuust. :D really looking forward to try out the new convnext and the new AdamW optimizer.

Hey! I'm having the same issue. What exactly did you do to fix it? I tried uninstall torchvision and reinstalling and older version. Same issue. Then I updated Faceswap via the gui, still having the same issue.

Any help would be appreciated!

User avatar
spewfy
Posts: 1
Joined: Sun Jan 19, 2025 4:17 am

Re: Faceswap 3 open for testing

Post by spewfy »

Problem with Alignments

Testing on Linux only, I have a problem with alignments file. All frames are missing alignments so convert process isn't working. Testing Alignments with tools.py, I can identify the issue:

python faceswap.py extract -i test.mp4 -o output -p test.fsa -A fan -D s3fd -L VERBOSE
01/19/2025 12:08:52 INFO Aligner filtered: (features (1.00): 7)
01/19/2025 12:08:52 INFO Writing alignments to: '/home/ubuntu/fs3/test.fsa'
01/19/2025 12:08:52 INFO -------------------------
01/19/2025 12:08:52 INFO Images found: 0
01/19/2025 12:08:52 INFO Faces detected: 601
01/19/2025 12:08:52 INFO -------------------------
01/19/2025 12:08:52 INFO Process Successfully Completed. Shutting Down...

python tools.py alignments -j extract -a test.fsa -r test.mp4 -c extract -L VERBOSE
01/19/2025 12:10:55 INFO [FRAMES DATA]
01/19/2025 12:10:55 VERBOSE Video exists at: '/home/ubuntu/fs3/test.mp4'
01/19/2025 12:10:55 INFO Loading video frames from /home/ubuntu/fs3/test.mp4
01/19/2025 12:10:56 VERBOSE 601 items loaded
01/19/2025 12:10:56 INFO [EXTRACT FACES]
01/19/2025 12:10:56 VERBOSE Creating output folder at '/home/ubuntu/fs3/extract'
01/19/2025 12:11:31 INFO 601 face(s) extracted

python tools.py alignments -j missing-alignments -a test.fsa -r extract -L VERBOSE
01/19/2025 12:13:15 INFO [FRAMES DATA]
01/19/2025 12:13:15 VERBOSE Folder exists at '/home/ubuntu/fs3/extract'
01/19/2025 12:13:15 INFO Loading file list from /home/ubuntu/fs3/extract
01/19/2025 12:13:15 VERBOSE 601 items loaded
01/19/2025 12:13:15 INFO [CHECK FRAMES]
01/19/2025 12:13:15 INFO -----------------------------------------------
01/19/2025 12:13:15 INFO --- Frames missing from alignments file (601)
01/19/2025 12:13:15 INFO -----------------------------------------------
01/19/2025 12:13:15 INFO test_000001_0.png
01/19/2025 12:13:15 INFO test_000002_0.png
01/19/2025 12:13:15 INFO test_000003_0.png
01/19/2025 12:13:15 INFO test_000004_0.png
01/19/2025 12:13:15 INFO test_000005_0.png
....

Please let me know how to get around this

Thank you

User avatar
BCD16
Posts: 1
Joined: Thu Jan 23, 2025 9:47 am

Re: Faceswap 3 open for testing

Post by BCD16 »

Hello, M4 Max Macbook Pro user here,

Installed succesfully in a virtual miniforge3 environment, without any errors.

Training starts and after a couple seconds, this warning shows up:

/miniforge3/envs/fs3/lib/python3.11/site-packages/keras/src/backend/torch/optimizers/torch_adam.py:35: UserWarning: The operator 'aten::foreach_mul.Scalar' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance implications. (Triggered internally at /Users/runner/work/temp/anaconda/conda-bld/pytorch_1711403251597/work/aten/src/ATen/mps/MPSFallback.mm:13.)
torch.
foreach_mul_(m_list, self.beta_1)

And preview pictures like rainbow. I waited for 30 minutes, Loss is not going down. Sometimes training directly ends with NaN Protection error.

I see that your script installs pytorch 2.3.1 , i tried all versions between 2.2.2-2.3.1. Nothing changes. I changed optimizer to Lion or other ones, same result.

Same result with or without mixed precision enabled.

edit: OK now I got it working. Forced to install pytorch 2.6.0 in conda env, and override pytorch version check in /cli/launcher.py file.

Training works now with FP16 enabled, but significantly slower than tensorflow backend.

In my faceswap2 environment I have been using tensorflow 2.13 and tensorflow-metal 1.0.0 and i am really happy with its FP16 speed with legacy Adam optimizer. This beta version should be improved much much more.

Last edited by BCD16 on Wed Feb 26, 2025 7:23 pm, edited 1 time in total.
User avatar
burnout_
Posts: 1
Joined: Sat Jan 25, 2025 3:54 am

Re: Faceswap 3 open for testing

Post by burnout_ »

bug when installing for nvidia users. windows 10. username removed.

(fs3) C:\Users\\>cd fs3

(fs3) C:\Users\\fs3>git checkout fs3
branch 'fs3' set up to track 'origin/fs3'.
Switched to a new branch 'fs3'

(fs3) C:\Users\\fs3>conda activate fs3

(fs3) C:\Users\\fs3>python setup.py --installer --nvidia
←[32mINFO←[0m Running without root/admin privileges
←[32mINFO←[0m The tool provides tips for installation and installs required python packages
←[32mINFO←[0m Setup in Windows 10
←[32mINFO←[0m Installed Python: 3.11.11 64bit
←[32mINFO←[0m Running in Conda
←[32mINFO←[0m Running in a Virtual Environment
←[32mINFO←[0m Encoding: cp1252
←[32mINFO←[0m Installed pip: 24.2
←[32mINFO←[0m Installing packaging
packaging-24.2 | 200 KB | | 0%
←[A packaging-24.2 | 200 KB | ██ | 8%
←[A packaging-24.2 | 200 KB | █████████████████████████████████ | 96%
←[A packaging-24.2 | 200 KB | ███████████████████████████████████ | 100%
←[A packaging-24.2 | 200 KB | ███████████████████████████████████ | 100%
←[32mINFO←[0m Faceswap config written to: C:\Users\\fs3\config\.faceswap
←[32mINFO←[0m Keras config written to: C:\Users\\.keras\keras.json
INFO Installing Required Python Packages. This may take some time...
INFO Installing pywinpty>=2.0.2
ERROR Unable to install package: pywinpty>=2.0.2. Process aborted

User avatar
DeliciousCaramels
Posts: 3
Joined: Wed Mar 05, 2025 7:57 am

Re: Faceswap 3 open for testing

Post by DeliciousCaramels »

Barnuble wrote: Sun Jun 23, 2024 2:36 pm

Hi everybody,

I tried to install FS3

I get this error :
WARNING Couldn't install ['"pytorch>=2.2.2,<2.4.0"', 'pytorch-cuda==12.1', '"torchaudio>=2.2.2,<2.4.0"', '"torchvision<0.19.0,>=0.17.2"'] with Conda. Please install this package manually

I tried to install it manually with the following command:
conda install pytorch torchvision torchaudio -c pytorch

...but I keep getting errors on launch... Will you create an installer ?

Thanks in advance !

I have the same issue, my assumption is I am lacking the appropriate Cuda packages.

Can you let us know which version of Cuda, CuDnn and Cuda toolkit are compatible? Cheers!

With respect to potential issues, I note the install logs indicate some invalid characters, which I have experienced before installing Python stuff, just cannot for the life of me remember how I fixed it.

Code: Select all

 Installing pytorch<2.4.0,>=2.2.2 pytorch-cuda==12.1 torchaudio<2.4.0,>=2.2.2 torchvision<0.19.0,>=0.17.2
03/05/2025 21:21:06 setup            __init__                       DEBUG    argv: ['conda', 'install', '-y', '-c', 'nvidia', '-c', 'pytorch', '-c', 'defaults', '--override-channels', '"pytorch<2.4.0,>=2.2.2"', 'pytorch-cuda==12.1', '"torchaudio<2.4.0,>=2.2.2"', '"torchvision<0.19.0,>=0.17.2"']
03/05/2025 21:21:06 setup            __init__                       DEBUG    cmd: 'C:\Users\admin\miniconda3\condabin\conda.BAT', cmdline: 'conda install -y -c nvidia -c pytorch -c defaults --override-channels \"pytorch<2.4.0,>=2.2.2\" pytorch-cuda==12.1 \"torchaudio<2.4.0,>=2.2.2\" \"torchvision<0.19.0,>=0.17.2\"'
03/05/2025 21:21:07 setup            _seen_line_log                 DEBUG    
03/05/2025 21:21:07 setup _seen_line_log DEBUG InvalidMatchSpec: Invalid spec '"pytorch<2.4.0,>=2.2.2"': Invalid version '2.2.2"': invalid characte 03/05/2025 21:21:07 setup _seen_line_log DEBUG r(s) 03/05/2025 21:21:08 setup __call__ DEBUG Package: pytorch<2.4.0,>=2.2.2 pytorch-cuda==12.1 torchaudio<2.4.0,>=2.2.2 torchvision<0.19.0,>=0.17.2, returncode: 1
Post Reply