Compare commits
14 Commits
f86bd6c713
...
4a079cdcd2
Author | SHA1 | Date |
---|---|---|
|
4a079cdcd2 | |
|
e531f6f26e | |
|
c39f6ac33b | |
|
5812ef3cc9 | |
|
b9aac85635 | |
|
75decc5838 | |
|
f38ebb485a | |
|
95742c8fd5 | |
|
6d6d2fc748 | |
|
cb9d04933b | |
|
2edde04570 | |
|
5da4632c15 | |
|
0f65be8bb3 | |
|
d0faf924d1 |
|
@ -0,0 +1,40 @@
|
||||||
|
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||||
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||||
|
|
||||||
|
name: Python package
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: falses
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.9", "3.10", "3.11"]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install flake8 pytest
|
||||||
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
- name: Lint with flake8
|
||||||
|
run: |
|
||||||
|
# stop the build if there are Python syntax errors or undefined names
|
||||||
|
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||||
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||||
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||||
|
- name: Test with pytest
|
||||||
|
run: |
|
||||||
|
pytest
|
|
@ -1,3 +1,3 @@
|
||||||
name = 'Deep Live Cam'
|
name = 'Deep Live Cam'
|
||||||
version = '1.5.0'
|
version = '1.6.0'
|
||||||
edition = 'Portable'
|
edition = 'Portable'
|
||||||
|
|
|
@ -18,7 +18,7 @@ NAME = 'DLC.FACE-SWAPPER'
|
||||||
|
|
||||||
def pre_check() -> bool:
|
def pre_check() -> bool:
|
||||||
download_directory_path = resolve_relative_path('../models')
|
download_directory_path = resolve_relative_path('../models')
|
||||||
conditional_download(download_directory_path, ['https://huggingface.co/hacksider/deep-live-cam/blob/main/inswapper_128.onnx'])
|
conditional_download(download_directory_path, ['https://huggingface.co/hacksider/deep-live-cam/blob/main/inswapper_128_fp16.onnx'])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ def get_face_swapper() -> Any:
|
||||||
|
|
||||||
with THREAD_LOCK:
|
with THREAD_LOCK:
|
||||||
if FACE_SWAPPER is None:
|
if FACE_SWAPPER is None:
|
||||||
model_path = resolve_relative_path('../models/inswapper_128.onnx')
|
model_path = resolve_relative_path('../models/inswapper_128_fp16.onnx')
|
||||||
FACE_SWAPPER = insightface.model_zoo.get_model(model_path, providers=modules.globals.execution_providers)
|
FACE_SWAPPER = insightface.model_zoo.get_model(model_path, providers=modules.globals.execution_providers)
|
||||||
return FACE_SWAPPER
|
return FACE_SWAPPER
|
||||||
|
|
||||||
|
|
774
modules/ui.py
774
modules/ui.py
File diff suppressed because it is too large
Load Diff
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
numpy>=1.23.5,<2
|
numpy>=1.23.5,<2
|
||||||
opencv-python==4.8.1.78
|
opencv-python==4.8.1.78
|
||||||
|
cv2_enumerate_cameras==1.1.15
|
||||||
onnx==1.16.0
|
onnx==1.16.0
|
||||||
insightface==0.7.3
|
insightface==0.7.3
|
||||||
psutil==5.9.8
|
psutil==5.9.8
|
||||||
|
|
Loading…
Reference in New Issue