hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
39.26k stars 5.7k forks source link

Low FPS on MacBook Pro M3 Pro #224

Closed AlexUrrutia closed 6 days ago

AlexUrrutia commented 2 months ago

Apple MacBook Pro M3, how to improve fps?

https://github.com/user-attachments/assets/0a6ebebb-e208-4266-98ae-005fe7ad6e3c

EnVoY123 commented 2 months ago

same problem on M1 Pro

jasonkneen commented 2 months ago

Same -- terrible frame rate

EnVoY123 commented 2 months ago

https://github.com/gongzhang/Deep-Live-Cam/blob/main/README.macos.md

try this

AlexUrrutia commented 2 months ago

https://github.com/gongzhang/Deep-Live-Cam/blob/main/README.macos.md

try this

I did, same result...

Wind010 commented 2 months ago

Try playing around with the command line parameters for --execution-provider and --execution-threads:

I seem to have better luck with using the CPU than coreML. Also try keep FPS.

python run.py --execution-provider cpu --execution-threads 4
jasonkneen commented 2 months ago

managed to get my version working

https://github.com/jasonkneen/Deep-Live-Cam.git

faster and now uses the GPU on Apple Silicon

AlexUrrutia commented 2 months ago

managed to get my version working

https://github.com/jasonkneen/Deep-Live-Cam.git

faster and now uses the GPU on Apple Silicon

Can you post the steps needed to make it work with your forked code? Thanks!

binglord commented 2 months ago

same on M3 PRO 512+36GB RAM

grahamj commented 2 months ago

At least you got it working 😬

I just got a blank window on both M1P and M2P MBPs. Using pyenv with 3.10.14.

Wind010 commented 2 months ago

At least you got it working 😬

I just got a blank window on both M1P and M2P MBPs. Using pyenv with 3.10.14.

Try Python 3.11. It's what I am using. Via MiniConda.

grahamj commented 2 months ago

Got it going with

https://github.com/hacksider/Deep-Live-Cam/issues/119#issuecomment-2282301745

kr3kls commented 2 months ago

managed to get my version working

https://github.com/jasonkneen/Deep-Live-Cam.git

faster and now uses the GPU on Apple Silicon

It appears your requirements.txt is missing customtkinter and it won't run without it. I tried adding customtkinter==5.2.2 from the original repo to your requirements.txt and it runs but won't load the model in live view. It fails to load the model with an INVALID_PROTOBUF error.

MillionaireChen commented 1 month ago

managed to get my version working https://github.com/jasonkneen/Deep-Live-Cam.git faster and now uses the GPU on Apple Silicon

It appears your requirements.txt is missing customtkinter and it won't run without it. I tried adding customtkinter==5.2.2 from the original repo to your requirements.txt and it runs but won't load the model in live view. It fails to load the model with an INVALID_PROTOBUF error.

image

mine is workingworking. But still a lower rate of GPU.

ChristianWeyer commented 1 month ago

managed to get my version working

https://github.com/jasonkneen/Deep-Live-Cam.git

faster and now uses the GPU on Apple Silicon

Can't get you version working @jasonkneen

poncion commented 4 weeks ago

Using the M3 version, I attempted the following:

The performance improved, but it can be better because I'm not using the power of my graphic card.