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
34.97k stars 4.94k forks source link

The program only uses the CPU for calculations on mac computers #487

Open teethandnail opened 2 weeks ago

teethandnail commented 2 weeks ago
截屏2024-08-28 17 07 30

How can I enable gpu on my mac ?

teethandnail commented 2 weeks ago
image

I installed the above libraries.

emiyalee1005 commented 2 weeks ago

I'm facing the same issue on my m3 max device too. I have following the steps and successfully run with python run.py --execution-provider coreml. But the app only use my cpu and thus very laggy

DaoDaoNoCode commented 2 weeks ago

+1, is there a way to get better support on M3 chip? It's very laggy on my M3 macbook and I believe the GPU is not fully used.

cchance27 commented 2 weeks ago

Same question i came here to ask, its attrocious on mac, like severe lag, also it always uses continuity cam instead of the builtin mac cam, don't see a flag to disable it.

emiyalee1005 commented 2 weeks ago

I'm facing the same issue on my m3 max device too. I have following the steps and successfully run with python run.py --execution-provider coreml. But the app only use my cpu and thus very laggy

Here is the monitor data

image
cdrake118 commented 2 weeks ago

Same issue for me. M2 Max

Screenshot 2024-08-28 at 9 34 51 PM
budda commented 1 week ago

Same question i came here to ask, its attrocious on mac, like severe lag, also it always uses continuity cam instead of the builtin mac cam, don't see a flag to disable it.

I changed the default camera by editing the ui.py file - look for camera = cv2.VideoCapture(0) and change the number. 0 was my iPhone, 1 was my monitor, I assume 2 will be my macbook built in one. Your numeration will vary.

budda commented 1 week ago
image

I installed the above libraries.

How did you manage to get the onnxruntime-silicon package installed ?! I just get the error:

ERROR: Could not find a version that satisfies the requirement onnxruntime-silicon (from versions: none)
ERROR: No matching distribution found for onnxruntime-silicon
defertoexpertise commented 1 week ago
image

I installed the above libraries.

How did you manage to get the onnxruntime-silicon package installed ?! I just get the error:

ERROR: Could not find a version that satisfies the requirement onnxruntime-silicon (from versions: none)
ERROR: No matching distribution found for onnxruntime-silicon

wrong python version?

solstice-gao commented 1 week ago

Using a 32-bit ONNX model increases the inference speed to 15fps, primarily because onnxruntime doesn't yet fully support Apple's M-series chips.

  1. You can refer to this repository: Deep-Live-Cam.
  2. I am currently converting an ONNX model to a PyTorch model and utilizing MPS for acceleration, but I have encountered some issues during inference and am working to resolve them.

If you are interested, feel free to contact me via email: 17604515707@163.com.

budda commented 1 week ago
image

I installed the above libraries.

How did you manage to get the onnxruntime-silicon package installed ?! I just get the error:

ERROR: Could not find a version that satisfies the requirement onnxruntime-silicon (from versions: none)
ERROR: No matching distribution found for onnxruntime-silicon

wrong python version?

yeah it's newer than 3.10 I tried to downgrade python but didn't seem to "work" for me. I'm new to the world of Python though...

It looks like the package has been renamed to onnxruntime-arm64 now?

teethandnail commented 1 week ago
image

I installed the above libraries.

How did you manage to get the onnxruntime-silicon package installed ?! I just get the error:

ERROR: Could not find a version that satisfies the requirement onnxruntime-silicon (from versions: none)
ERROR: No matching distribution found for onnxruntime-silicon

I installed miniconda, then used miniconda to create a python virtual environment, installed python3.10.10 in the virtual environment, and then executed the commands according to the author's instructions.

defertoexpertise commented 1 week ago

Perhaps a silly question... but are you on an Arm based mac or an older intel mac?

budda commented 1 week ago

Perhaps a silly question... but are you on an Arm based mac or an older intel mac?

yeah, M2 Max here.