mirror of
https://github.com/hacksider/Deep-Live-Cam.git
synced 2026-04-22 00:56:08 +02:00
9207386e07
Change default face swapper model to FP32 for better GPU compatibility and avoid NaN issues on certain GPUs. Revamped `run.py` to adjust PATH variables for dependencies setup and re-added with expanded configuration.
25 lines
786 B
Python
25 lines
786 B
Python
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Add the project root to PATH so bundled ffmpeg/ffprobe are found
|
|
project_root = os.path.dirname(os.path.abspath(__file__))
|
|
os.environ["PATH"] = project_root + os.pathsep + os.environ.get("PATH", "")
|
|
|
|
# Add NVIDIA CUDA DLL directories to PATH so onnxruntime-gpu can find them
|
|
nvidia_dir = os.path.join(project_root, "venv", "Lib", "site-packages", "nvidia")
|
|
if os.path.isdir(nvidia_dir):
|
|
for pkg in os.listdir(nvidia_dir):
|
|
bin_dir = os.path.join(nvidia_dir, pkg, "bin")
|
|
if os.path.isdir(bin_dir):
|
|
os.environ["PATH"] = bin_dir + os.pathsep + os.environ["PATH"]
|
|
|
|
# Import the tkinter fix to patch the ScreenChanged error
|
|
import tkinter_fix
|
|
|
|
from modules import core
|
|
|
|
if __name__ == '__main__':
|
|
core.run()
|