-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Open
Description
Bug Description
The face swapper model fails to load due to inconsistent model filename references in the code. The application searches for both inswapper_128.onnx and inswapper_128_fp16.onnx at different times, but the documentation instructs users to download inswapper_128_fp16.onnx.
Environment
- OS: Windows 11
- Deep-Live-Cam Version: 2.0.1c
- Python Version: 3.11.9
- Execution Provider: CUDA (CUDAExecutionProvider)
- GPU: NVIDIA GeForce RTX 4050 Laptop GPU
- CUDA Version: 12.8
- cuDNN Version: 8.9.7
Steps to Reproduce
- Follow the installation instructions from README
- Download the model files as instructed:
GFPGANv1.4.pthinswapper_128_fp16.onnx(as per documentation)
- Place files in
models/directory - Run:
python run.py --execution-provider cuda - Select a source face and click "Live"
Expected Behavior
The face swapper model should load successfully and swap faces in real-time.
Actual Behavior
The application repeatedly fails to load the model with the error:
[DLC.FACE-SWAPPER] Loading face swapper model from: C:\Deep-Live-Cam\models\inswapper_128_fp16.onnx
[DLC.FACE-SWAPPER] Error loading face swapper model: model_file C:\Deep-Live-Cam\models\inswapper_128_fp16.onnx should exist
[DLC.FACE-SWAPPER] Face swapper model not loaded or failed to load. Skipping swap.
Sometimes it also searches for inswapper_128.onnx (without _fp16).
Console Output
Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
[DLC.FACE-SWAPPER] Loading face swapper model from: C:\Deep-Live-Cam\models\inswapper_128_fp16.onnx
[DLC.FACE-SWAPPER] Error loading face swapper model: model_file C:\Deep-Live-Cam\models\inswapper_128_fp16.onnx should exist
[DLC.FACE-SWAPPER] Face swapper model not loaded or failed to load. Skipping swap.
Impact
- Face swapping functionality completely non-functional
- Only Face Enhancer works (with CUDA)
- Application shows FPS: 3-4 (very slow due to missing face swap model)
- No actual face replacement occurs - only blur/enhancement
Additional Information
- The file
inswapper_128_fp16.onnxexists in themodels/directory - File size: ~528 MB (downloaded from the official HuggingFace link)
- GFPGANv1.4.pth loads successfully
- CUDA is properly configured and working (confirmed via PyTorch and ONNX Runtime tests)
Possible Solution
The code should consistently reference the correct model filename. Either:
- Update code to use
inswapper_128_fp16.onnxeverywhere, OR - Update documentation to instruct users to rename the file to
inswapper_128.onnx
Verification
I verified that:
- ✅ PyTorch sees CUDA:
torch.cuda.is_available()returnsTrue - ✅ ONNX Runtime has CUDA:
ort.get_available_providers()includesCUDAExecutionProvider - ✅ GPU is properly configured in Windows Graphics Settings
- ✅ All dependencies installed correctly
- ❌ Face swapper model fails to load
Thank you for this amazing project! Looking forward to seeing this resolved.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels