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.6k stars 4.88k forks source link

Hey, I can't launch it MacOS Sillicon #214

Open MathisZerbib opened 1 month ago

MathisZerbib commented 1 month ago

I've made a conda env 3.10.9

conda create --name deep-live-cam
conda activate deep-live-cam   

and

I followed along the installation with

`pip install -r requirements.txt

pip uninstall onnxruntime onnxruntime-silicon pip install onnxruntime-silicon==1.13.1

`

python run.py --execution-provider coreml


Traceback (most recent call last):
  File "/Users/zer/Documents/lab/perso/Deep-Live-Cam/run.py", line 6, in <module>
    core.run()
  File "/Users/zer/Documents/lab/perso/Deep-Live-Cam/modules/core.py", line 242, in run
    limit_resources()
  File "/Users/zer/Documents/lab/perso/Deep-Live-Cam/modules/core.py", line 131, in limit_resources
    gpus = tensorflow.config.experimental.list_physical_devices('GPU')
AttributeError: module 'tensorflow' has no attribute 'config'

and

python run.py

give me the same output

my dependencies

pip list | grep -E "numpy|opencv-python|onnx|insightface|psutil|tk|customtkinter|pillow|torch|torchvision|onnxruntime|tensorflow|opennsfw2|protobuf|tqdm|gfpgan"

numpy                                           1.23.5
opencv-python                                   4.8.1.78
opencv-python-headless                          4.9.0.80
onnx                                            1.16.0
insightface                                     0.7.3
psutil                                          5.9.8
tk                                              0.1.0
customtkinter                                   5.2.2
gfpgan                                          1.3.8
pillow                                          9.5.0
onnxruntime-silicon                             1.16.3
opennsfw2                                       0.10.2
tensorflow                                      2.13.0rc1
tensorflow-estimator                            2.13.0
tensorflow-io-gcs-filesystem                    0.37.0
tensorflow-macos                                2.13.0rc1
torch                                           2.0.1
torchvision                                     0.15.2
tqdm                                            4.66.4
protobuf                                        4.23.2

Help would be appreciated ! cheers

amanaknows commented 1 month ago

AI Automation Dark Side Control Badge

YetHowTolove commented 1 month ago

me2 bro , wait for the chef answer your question , cheers

YetHowTolove commented 1 month ago

hi bro i think i deal with this issue, you just go to your venv and delete all tensorflow named package,then pip install -r requirements.txt,and it can work

may this help you bro

MathisZerbib commented 1 month ago

I tried that thank's but not working, I also tried a `pip install --upgrade tensorflow python run.py --execution-provider coreml

Traceback (most recent call last): File "/Users/zer/Documents/lab/perso/Deep-Live-Cam/run.py", line 6, in core.run() File "/Users/zer/Documents/lab/perso/Deep-Live-Cam/modules/core.py", line 246, in run window = ui.init(start, destroy) File "/Users/zer/Documents/lab/perso/Deep-Live-Cam/modules/ui.py", line 39, in init ROOT = create_root(start, destroy) File "/Users/zer/Documents/lab/perso/Deep-Live-Cam/modules/ui.py", line 52, in create_root root = ctk.CTk() File "/Users/zer/.pyenv/versions/3.10.9/lib/python3.10/site-packages/customtkinter/windows/ctk_tk.py", line 40, in init CTK_PARENT_CLASS.init(self, **pop_from_dict_by_set(kwargs, self._valid_tk_constructor_arguments)) File "/Users/zer/.pyenv/versions/3.10.9/lib/python3.10/tkinter/init.py", line 2301, in init self._loadtk() File "/Users/zer/.pyenv/versions/3.10.9/lib/python3.10/tkinter/init.py", line 2317, in _loadtk raise RuntimeError("tk.h version (%s) doesn't match libtk.a version (%s)" RuntimeError: tk.h version (8.5) doesn't match libtk.a version (8.6) `

This Might help on this issue, tk seems to not work for 3.10 python

https://github.com/actions/setup-python/issues/649#issuecomment-1745056485

I will try with 3.11

AlexUrrutia commented 1 month ago

Tried Python 3.11 and it works, 3.12 does not work at the moment