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.85k stars 4.91k forks source link

The interface opens successfully, but when I start Live, the face appears black. Why is this happening, and how can I fix it? #210

Open hhhaiai opened 1 month ago

hhhaiai commented 1 month ago

The interface opens successfully, but when I start Live, the face appears black. Why is this happening, and how can I fix it?

image image
hhhaiai commented 1 month ago

image not real people. from net web

hhhaiai commented 1 month ago

when run

$python run.py
Frame processor face_enhancer not found
2024-08-12 17:45:17.621 Python[58252:278202] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
hhhaiai commented 1 month ago

MacBook Pro

  1. 2.4 GHz 八核Intel Core i9
  2. AMD Radeon Pro 5500M 8 GB Intel UHD Graphics 630 1536 MB

  3. 64 GB 2667 MHz DDR4
  4. os version: 14.4.1
William-island commented 1 month ago

Try strictly follow the official tutorial: pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3

AlexUrrutia commented 1 month ago

@William-island

ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.16.3 (from versions: none)
ERROR: No matching distribution found for onnxruntime-gpu==1.16.3
sunyq1995 commented 1 month ago

I meet same error but I use windows11 and without GPU, Error: [ WARN:1@763.558] global cap_msmf.cpp:471 anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -1072873821 [ WARN:1@763.568] global cap_msmf.cpp:483anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -1072873821 [ WARN:1@764.451] global cap_msmf.cpp:471 anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -1072873821 [ WARN:1@764.470] global cap_msmf.cpp:483anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -1072873821 [ WARN:2@825.359] global cap_msmf.cpp:471 anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -1072873821 [ WARN:2@825.363] global cap_msmf.cpp:483anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -1072873821

hhhaiai commented 1 month ago
image

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.16.3 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.16.3

hhhaiai commented 1 month ago

@William-island failed ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.16.3 (from versions: none) ERROR: No matching distribution found for onnxruntime-gpu==1.16.3

ANK789 commented 1 month ago

win10 ,without GPU, running result is the same as the subject, with a large black face

William-island commented 1 month ago

I can find the package from tsinghua index. image

aamasimak commented 1 month ago

for people that struggle with onnx 1.16.3, make sure your python is 3.10, if it is it will be installed automatically it worked on an env using py 3.10

sunyq1995 commented 4 weeks ago

or people that struggle with onnx 1.16.3, make sure your python is 3.10, if it is it will be installed automatically it worked on an env using py 3.10

it works, really thanks!

maximka1980 commented 3 weeks ago

if i install onnxruntime-gpu==1.16.3 programm dont start with errors

(deep) PS D:\deep_live_cam\Deep-Live-Cam> python .\run.py Traceback (most recent call last): File "D:\deep_live_cam\Deep-Live-Cam\run.py", line 3, in from modules import core File "D:\deep_live_cam\Deep-Live-Cam\modules\core.py", line 20, in import modules.ui as ui File "D:\deep_live_cam\Deep-Live-Cam\modules\ui.py", line 10, in from modules.face_analyser import get_one_face File "D:\deep_live_cam\Deep-Live-Cam\modules\face_analyser.py", line 2, in import insightface File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightface__init.py", line 16, in from . import model_zoo File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightface\model_zoo\init__.py", line 1, in from .model_zoo import get_model File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 22, in class PickableInferenceSession(onnxruntime.InferenceSession): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'onnxruntime' has no attribute 'InferenceSession' (deep) PS D:\deep_live_cam\Deep-Live-Cam>

but if i installed onnxruntime-gpu==1.19 program starts properly but face is like black square

pyenv global 3.10 local 3.10

how to fix i?

aamasimak commented 3 weeks ago

if i install onnxruntime-gpu==1.16.3 programm dont start with errors

(deep) PS D:\deep_live_cam\Deep-Live-Cam> python .\run.py Traceback (most recent call last): File "D:\deep_live_cam\Deep-Live-Cam\run.py", line 3, in from modules import core File "D:\deep_live_cam\Deep-Live-Cam\modules\core.py", line 20, in import modules.ui as ui File "D:\deep_live_cam\Deep-Live-Cam\modules\ui.py", line 10, in from modules.face_analyser import get_one_face File "D:\deep_live_cam\Deep-Live-Cam\modules\face_analyser.py", line 2, in import insightface File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightfaceinit.py", line 16, in from . import model_zoo File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightface\model_zooinit.py", line 1, in from .model_zoo import get_model File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 22, in class PickableInferenceSession(onnxruntime.InferenceSession): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'onnxruntime' has no attribute 'InferenceSession' (deep) PS D:\deep_live_cam\Deep-Live-Cam>

but if i installed onnxruntime-gpu==1.19 program starts properly but face is like black square

pyenv global 3.10 local 3.10

how to fix i?

@maximka1980 from what I noticed you are running this using only python .\run.py from documentation u should use python run.py --execution-provider cuda if u are using cuda and keep the same onnxruntime-gpu==1.16.3

pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3

maximka1980 commented 3 weeks ago

@aamasimak i am use cuda, i am starting bat file with cuda provider. "pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3" dont work properly because pip install onnxruntime-gpu==1.16.3 dont working yet.

hhhaiai commented 3 weeks ago

has no cuda (navid) , can work?

aamasimak commented 3 weeks ago

@aamasimak i am use cuda, i am starting bat file with cuda provider. "pip uninstall onnxruntime onnxruntime-gpu pip install onnxruntime-gpu==1.16.3" dont work properly because pip install onnxruntime-gpu==1.16.3 dont working yet.

@maximka1980 what do u mean doesnt work? If u are unable to download it probably u dont have the right python version 3.10

Also will be better to share ur output so we know what is going on

aamasimak commented 3 weeks ago

has no cuda (navid) , can work?

@hhhaiai i believe it can run on cpu, check documentation

exploretech commented 1 week ago

if i install onnxruntime-gpu==1.16.3 programm dont start with errors

(deep) PS D:\deep_live_cam\Deep-Live-Cam> python .\run.py Traceback (most recent call last): File "D:\deep_live_cam\Deep-Live-Cam\run.py", line 3, in from modules import core File "D:\deep_live_cam\Deep-Live-Cam\modules\core.py", line 20, in import modules.ui as ui File "D:\deep_live_cam\Deep-Live-Cam\modules\ui.py", line 10, in from modules.face_analyser import get_one_face File "D:\deep_live_cam\Deep-Live-Cam\modules\face_analyser.py", line 2, in import insightface File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightfaceinit.py", line 16, in from . import model_zoo File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightface\model_zooinit.py", line 1, in from .model_zoo import get_model File "D:\deep_live_cam\Deep-Live-Cam\deep\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 22, in class PickableInferenceSession(onnxruntime.InferenceSession): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'onnxruntime' has no attribute 'InferenceSession' (deep) PS D:\deep_live_cam\Deep-Live-Cam>

but if i installed onnxruntime-gpu==1.19 program starts properly but face is like black square

pyenv global 3.10 local 3.10

how to fix i?

first of all install this pip install insightface==0.7.3

hhhaiai commented 1 week ago

pip install insightface==0.7.3

It can work in windows, mac (intel) can't work.

Frame processor face_enhancer not found
hhhaiai commented 1 week ago

for people that struggle with onnx 1.16.3, make sure your python is 3.10, if it is it will be installed automatically it worked on an env using py 3.10

Not has 1.16.3


$pip install onnx==1.16.3
ERROR: Could not find a version that satisfies the requirement onnx==1.16.3 (from versions: 0.1, 0.2, 0.2.1, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.2.1, 1.2.2, 1.2.3, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.9.0, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.13.0, 1.13.1, 1.14.0, 1.14.1, 1.15.0, 1.16.0, 1.16.1, 1.16.2)
ERROR: No matching distribution found for onnx==1.16.3
hhhaiai commented 1 week ago

pip install insightface==0.7.3

same case