Compare commits

...

9 Commits

Author SHA1 Message Date
David Strouk 22bb14e9ad
Merge 647c5f250f into fc86365a90 2025-07-08 13:59:23 +07:00
Kenneth Estanislao fc86365a90 Delete .yml 2025-07-02 18:37:10 +08:00
Kenneth Estanislao 1dd0e8e509
Create .yml 2025-07-02 18:29:32 +08:00
Kenneth Estanislao 4e0ff540f0
Update requirements.txt
faster and better requirements
2025-07-02 04:08:26 +08:00
Kenneth Estanislao f0fae811d8
Update requirements.txt
should improve the performance by 30%
2025-06-29 15:03:35 +08:00
Kenneth Estanislao 42687f5bd9
Update README.md 2025-06-29 14:58:13 +08:00
David Strouk 647c5f250f
Update modules/processors/frame/face_swapper.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-04 17:06:09 +03:00
David Strouk ae88412aae
Update modules/processors/frame/face_swapper.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-04 17:04:08 +03:00
David Strouk b7e011f5e7 Fix model download path and URL
- Use models_dir instead of abs_dir for download path
- Create models directory if it doesn't exist
- Fix Hugging Face download URL by using /resolve/ instead of /blob/
2025-05-04 16:59:04 +03:00
3 changed files with 29 additions and 19 deletions

View File

@ -98,7 +98,7 @@ Users are expected to use this software responsibly and legally. If using a real
## Installation (Manual) ## Installation (Manual)
**Please be aware that the installation requires technical skills and is not for beginners. Consider downloading the prebuilt version.** **Please be aware that the installation requires technical skills and is not for beginners. Consider downloading the quickstart version.**
<details> <details>
<summary>Click to see the process</summary> <summary>Click to see the process</summary>
@ -109,7 +109,7 @@ This is more likely to work on your computer but will be slower as it utilizes t
**1. Set up Your Platform** **1. Set up Your Platform**
- Python (3.10 recommended) - Python (3.11 recommended)
- pip - pip
- git - git
- [ffmpeg](https://www.youtube.com/watch?v=OlNWCpFdVMA) - ```iex (irm ffmpeg.tc.ht)``` - [ffmpeg](https://www.youtube.com/watch?v=OlNWCpFdVMA) - ```iex (irm ffmpeg.tc.ht)```
@ -153,14 +153,14 @@ pip install -r requirements.txt
Apple Silicon (M1/M2/M3) requires specific setup: Apple Silicon (M1/M2/M3) requires specific setup:
```bash ```bash
# Install Python 3.10 (specific version is important) # Install Python 3.11 (specific version is important)
brew install python@3.10 brew install python@3.11
# Install tkinter package (required for the GUI) # Install tkinter package (required for the GUI)
brew install python-tk@3.10 brew install python-tk@3.10
# Create and activate virtual environment with Python 3.10 # Create and activate virtual environment with Python 3.11
python3.10 -m venv venv python3.11 -m venv venv
source venv/bin/activate source venv/bin/activate
# Install dependencies # Install dependencies
@ -236,7 +236,7 @@ python3.10 run.py --execution-provider coreml
# Uninstall conflicting versions if needed # Uninstall conflicting versions if needed
brew uninstall --ignore-dependencies python@3.11 python@3.13 brew uninstall --ignore-dependencies python@3.11 python@3.13
# Keep only Python 3.10 # Keep only Python 3.11
brew cleanup brew cleanup
``` ```
@ -246,7 +246,7 @@ python3.10 run.py --execution-provider coreml
```bash ```bash
pip uninstall onnxruntime onnxruntime-coreml pip uninstall onnxruntime onnxruntime-coreml
pip install onnxruntime-coreml==1.13.1 pip install onnxruntime-coreml==1.21.0
``` ```
2. Usage: 2. Usage:
@ -261,7 +261,7 @@ python run.py --execution-provider coreml
```bash ```bash
pip uninstall onnxruntime onnxruntime-directml pip uninstall onnxruntime onnxruntime-directml
pip install onnxruntime-directml==1.15.1 pip install onnxruntime-directml==1.21.0
``` ```
2. Usage: 2. Usage:
@ -276,7 +276,7 @@ python run.py --execution-provider directml
```bash ```bash
pip uninstall onnxruntime onnxruntime-openvino pip uninstall onnxruntime onnxruntime-openvino
pip install onnxruntime-openvino==1.15.0 pip install onnxruntime-openvino==1.21.0
``` ```
2. Usage: 2. Usage:

View File

@ -28,11 +28,21 @@ models_dir = os.path.join(
def pre_check() -> bool: def pre_check() -> bool:
download_directory_path = abs_dir # Use models_dir instead of abs_dir to save to the correct location
download_directory_path = models_dir
# Make sure the models directory exists, catch permission errors if they occur
try:
os.makedirs(download_directory_path, exist_ok=True)
except OSError as e:
logging.error(f"Failed to create directory {download_directory_path} due to permission error: {e}")
return False
# Use the direct download URL from Hugging Face
conditional_download( conditional_download(
download_directory_path, download_directory_path,
[ [
"https://huggingface.co/hacksider/deep-live-cam/blob/main/inswapper_128_fp16.onnx" "https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx"
], ],
) )
return True return True

View File

@ -1,21 +1,21 @@
--extra-index-url https://download.pytorch.org/whl/cu118 --extra-index-url https://download.pytorch.org/whl/cu128
numpy>=1.23.5,<2 numpy>=1.23.5,<2
typing-extensions>=4.8.0 typing-extensions>=4.8.0
opencv-python==4.10.0.84 opencv-python==4.10.0.84
cv2_enumerate_cameras==1.1.15 cv2_enumerate_cameras==1.1.15
onnx==1.16.0 onnx==1.18.0
insightface==0.7.3 insightface==0.7.3
psutil==5.9.8 psutil==5.9.8
tk==0.1.0 tk==0.1.0
customtkinter==5.2.2 customtkinter==5.2.2
pillow==11.1.0 pillow==11.1.0
torch==2.5.1+cu118; sys_platform != 'darwin' torch; sys_platform != 'darwin'
torch==2.5.1; sys_platform == 'darwin' torch==2.5.1; sys_platform == 'darwin'
torchvision==0.20.1; sys_platform != 'darwin' torchvision; sys_platform != 'darwin'
torchvision==0.20.1; sys_platform == 'darwin' torchvision==0.20.1; sys_platform == 'darwin'
onnxruntime-silicon==1.16.3; sys_platform == 'darwin' and platform_machine == 'arm64' onnxruntime-silicon==1.21.0; sys_platform == 'darwin' and platform_machine == 'arm64'
onnxruntime-gpu==1.17; sys_platform != 'darwin' onnxruntime-gpu==1.22.0; sys_platform != 'darwin'
tensorflow; sys_platform != 'darwin' tensorflow; sys_platform != 'darwin'
opennsfw2==0.10.2 opennsfw2==0.10.2
protobuf==4.23.2 protobuf==4.25.1