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.93k stars 4.93k forks source link

The application running but not show anything (MacOS) #119

Open sonnguyenHT opened 1 month ago

sonnguyenHT commented 1 month ago

image image

lsuanet commented 1 month ago

I have the same issue on M1 Pro.

Screenshot 2024-08-10 at 16 16 58

Hovering over the screen I can tell there are buttons I can press that give me a finder popup to select an image.

Using python 3.10.9 on MacOS 14.6

EDIT: using the button layout to guess where to click, I was actually able to start the webcam mode using my selected image. However, the "Preview" screen remained also blank for >3 minutes.

LuciNyan commented 1 month ago

Same issue on M3 Pro. 👀

sonnguyenHT commented 1 month ago

It's like using with imagination haha @lsuanet image It like you said @lsuanet even I can open the preview but nothing showed

PathfinderBot commented 1 month ago

Same issue on M1 Mac! Doesn't seem to be loading anything.

jmhublar commented 1 month ago

Same on MacBook Pro M3

ag-chirag commented 1 month ago

Same issue on my M1 Mac Studio.

danemacaulay commented 1 month ago

I'm seeing this warning, indicating the system version of tkinter is out of date:

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release.

I used brew to brew install python-tk@3.10 and installed deps and ran using pip3.10 and pytthon3.10

works fine now

ag-chirag commented 1 month ago

Thanks @danemacaulay!

If you are using pyenv like me, there are additional steps you need to follow to link tkinter to your local python.

  1. Install tcl-tk brew install tcl-tk
  2. Set environment variables for pyenv.
    export PATH="/opt/homebrew/opt/tcl-tk/bin:$PATH"
    export LDFLAGS="-L/opt/homebrew/opt/tcl-tk/lib"
    export CPPFLAGS="-I/opt/homebrew/opt/tcl-tk/include"
    export PKG_CONFIG_PATH="/opt/homebrew/opt/tcl-tk/lib/pkgconfig"
  3. source ~/.zshrc # or source ~/.bashrc
  4. Re-install python pyenv install 3.10
  5. Verify python -m tkinter
sonnguyenHT commented 1 month ago

Thank you a lot of @ag-chirag, I have fixed and working but I have another problem with FPS. It runned so bad

Ritavdas commented 1 month ago

Thanks @danemacaulay!

If you are using pyenv like me, there are additional steps you need to follow to link tkinter to your local python.

  1. Install tcl-tk brew install tcl-tk
  2. Set environment variables for pyenv.
export PATH="/opt/homebrew/opt/tcl-tk/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/tcl-tk/lib"
export CPPFLAGS="-I/opt/homebrew/opt/tcl-tk/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/tcl-tk/lib/pkgconfig"
  1. source ~/.zshrc # or source ~/.bashrc
  2. Re-install python pyenv install 3.10
  3. Verify python -m tkinter

It worked for me after I deleted my previous env

danemacaulay commented 1 month ago

Thank you a lot of @ag-chirag, I have fixed and working but I have another problem with FPS. It runned so bad

Ya, the model isn't using the GPU, there are a couple of issues highlighting that, and there doesn't appear to be a fix yet.

lasher169 commented 1 month ago

3. source ~/.zshrc

works for me now yeahhh....

raldred commented 1 month ago

I'm using asdf on Apple Silicon

Got it working with these steps:

  1. Install python tk from brew brew install python-tk@3.10
  2. Reinstall python asdf uninstall python 3.10.14 asdf install python 3.10.14
  3. Reinstall requirements pip install -r requirements.txt
  4. Run python run.py
AlexUrrutia commented 1 month ago

Running on MacBook Pro M3 Pro but fps is like 3-5fps Reduced size as well and still slow fps, it may be running on cpu only… any ideas?

raldred commented 1 month ago

Running on MacBook Pro M3 Pro but fps is like 3-5fps Reduced size as well and still slow fps, it may be running on cpu only… any ideas?

It's not very performant on Mac, so sounds about right, but you can try this model https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128.onnx

Rename to inswapper_128_fp16.onnx