Closed ig223 closed 1 month ago
I'd put some code in here but I really have no idea what to even show. Like it has no warning or error notifications, just nothing
OK So I made a new environment and this happened.
PS X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main> py -m venv livecam2
PS X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main> .\livecam2\Scripts\activate
(livecam2) PS X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main> pip uninstall onnxruntime onnxruntime-gpu WARNING: Skipping onnxruntime as it is not installed. WARNING: Skipping onnxruntime-gpu as it is not installed.
(livecam2) PS X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main> pip install -r requirements.txt Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118 Ignoring torch: markers 'sys_platform == "darwin"' don't match your environment Ignoring torchvision: markers 'sys_platform == "darwin"' don't match your environment Ignoring onnxruntime: markers 'sys_platform == "darwin" and platform_machine != "arm64"' don't match your environment Ignoring onnxruntime-silicon: markers 'sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment Ignoring tensorflow: markers 'sys_platform == "darwin"' don't match your environment Collecting numpy<2,>=1.23.5 Downloading numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB) |████████████████████████████████| 15.8 MB 3.2 MB/s Collecting opencv-python==4.8.1.78 Downloading opencv_python-4.8.1.78-cp37-abi3-win_amd64.whl (38.1 MB) |████████████████████████████████| 38.1 MB 129 kB/s Collecting onnx==1.16.0 Downloading onnx-1.16.0-cp310-cp310-win_amd64.whl (14.4 MB) |████████████████████████████████| 14.4 MB 52 kB/s Collecting insightface==0.7.3 Downloading insightface-0.7.3.tar.gz (439 kB) |████████████████████████████████| 439 kB 6.4 MB/s
(livecam2) PS X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main> python run.py --execution-provider cuda
Traceback (most recent call last): File "X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main\run.py", line 3, in
from modules import core File "X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main\modules\core.py", line 14, in import torch ModuleNotFoundError: No module named 'torch' (livecam2) PS X:\deep live cam\Deep-Live-Cam-main\Deep-Live-Cam-main>
I did a full video here of my third time installing, it is not an entertaining video but the full process https://youtu.be/OvjWOwUktxw
pip install torch
It turns out malwarebytes exploit protection was stopping me from installing something inside of the requirements.txt
I've managed to get it to the GUI, however, when pressing live, VSCODE gets this large amount of errors and I get a very large preview window 1080-1920 size that's fully black.
PS X:\deep live cam\Deepfake code\Deep-Live-Cam> python run.py --execution-provider cuda --video-quality 50 --live-mirror 2024-09-12 09:06:45.4749118 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 2024-09-12 09:06:45.9414329 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 2024-09-12 09:06:46.0164599 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 2024-09-12 09:06:46.1236836 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 2024-09-12 09:06:46.2463245 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (640, 640)
I messed around a bit and got something to change, a step ahead at least. New errors, however
PS X:\deep live cam\Deepfake code\Deep-Live-Cam> python run.py --execution-provider cuda --video-quality 50 --live-mirror 2024-09-12 09:27:23.2863113 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
EP Error D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported. when using ['CUDAExecutionProvider'] Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying. 2024-09-12 09:27:23.3946050 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
Exception in Tkinter callback
Traceback (most recent call last):
File "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 463, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "X:\python 3.10\lib\tkinter__init.py", line 1921, in call
return self.func(*args)
File "X:\python 3.10\lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
self._command()
File "X:\deep live cam\Deepfake code\Deep-Live-Cam\modules\ui.py", line 141, in
File "X:\python 3.10\lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model
session = PickableInferenceSession(self.onnx_file, kwargs)
File "X:\python 3.10\lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init
super().init(model_path, **kwargs)
File "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 430, in init__
raise fallback_error from e
File "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 425, in init
self._create_inference_session(self._fallback_providers, None)
File "X:\python 3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 463, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
From the last error in the previous entry, I followed this video: https://www.youtube.com/watch?v=KC9-9L7FgPc
Within this video was a comprehensive installation of both the Cuda and Cudnn files, as well as modifying the PATH correctly.
I no longer received that error, however I did receive the previous black screen at my screen resolution.
Here is what the Output was this time once I pressed Live.
Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CUDAExecutionProvider': {'cudnn_conv_algo_search': 'EXHAUSTIVE', 'device_id': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'has_user_compute_stream': '0', 'gpu_external_alloc': '0', 'enable_cuda_graph': '0', 'gpu_mem_limit': '18446744073709551615', 'gpu_external_free': '0', 'gpu_external_empty_cache': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'do_copy_in_default_stream': '1', 'cudnn_conv_use_max_workspace': '1', 'tunable_op_enable': '0', 'tunable_op_tuning_enable': '0', 'tunable_op_max_tuning_duration_ms': '0', 'enable_skip_layer_norm_strict_mode': '0'}, 'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CUDAExecutionProvider': {'cudnn_conv_algo_search': 'EXHAUSTIVE', 'device_id': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'has_user_compute_stream': '0', 'gpu_external_alloc': '0', 'enable_cuda_graph': '0', 'gpu_mem_limit': '18446744073709551615', 'gpu_external_free': '0', 'gpu_external_empty_cache': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'do_copy_in_default_stream': '1', 'cudnn_conv_use_max_workspace': '1', 'tunable_op_enable': '0', 'tunable_op_tuning_enable': '0', 'tunable_op_max_tuning_duration_ms': '0', 'enable_skip_layer_norm_strict_mode': '0'}, 'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CUDAExecutionProvider': {'cudnn_conv_algo_search': 'EXHAUSTIVE', 'device_id': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'has_user_compute_stream': '0', 'gpu_external_alloc': '0', 'enable_cuda_graph': '0', 'gpu_mem_limit': '18446744073709551615', 'gpu_external_free': '0', 'gpu_external_empty_cache': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'do_copy_in_default_stream': '1', 'cudnn_conv_use_max_workspace': '1', 'tunable_op_enable': '0', 'tunable_op_tuning_enable': '0', 'tunable_op_max_tuning_duration_ms': '0', 'enable_skip_layer_norm_strict_mode': '0'}, 'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CUDAExecutionProvider': {'cudnn_conv_algo_search': 'EXHAUSTIVE', 'device_id': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'has_user_compute_stream': '0', 'gpu_external_alloc': '0', 'enable_cuda_graph': '0', 'gpu_mem_limit': '18446744073709551615', 'gpu_external_free': '0', 'gpu_external_empty_cache': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'do_copy_in_default_stream': '1', 'cudnn_conv_use_max_workspace': '1', 'tunable_op_enable': '0', 'tunable_op_tuning_enable': '0', 'tunable_op_max_tuning_duration_ms': '0', 'enable_skip_layer_norm_strict_mode': '0'}, 'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CUDAExecutionProvider': {'cudnn_conv_algo_search': 'EXHAUSTIVE', 'device_id': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'has_user_compute_stream': '0', 'gpu_external_alloc': '0', 'enable_cuda_graph': '0', 'gpu_mem_limit': '18446744073709551615', 'gpu_external_free': '0', 'gpu_external_empty_cache': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'do_copy_in_default_stream': '1', 'cudnn_conv_use_max_workspace': '1', 'tunable_op_enable': '0', 'tunable_op_tuning_enable': '0', 'tunable_op_max_tuning_duration_ms': '0', 'enable_skip_layer_norm_strict_mode': '0'}, 'CPUExecutionProvider': {}} find model: C:\Users\19199/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (640, 640)
Nothing happens, no errors appear, the command prompt appears for a split second but that's it.