w413025 发表于 2024-8-11 13:09:13

dfsgsfdgsfdgsdfg

weihu19940327 发表于 2024-8-19 11:59:09

请问为啥刚下载了你发的版本,选择的是cuda为啥是cpu在跑呢

weihu19940327 发表于 2024-8-21 00:07:49

本帖最后由 weihu19940327 于 2024-8-22 12:07 编辑

111111试试

Arwar 发表于 2024-9-10 00:13:47

weihu19940327 发表于 2024-8-19 11:59
请问为啥刚下载了你发的版本,选择的是cuda为啥是cpu在跑呢

我也碰到这个问题,安装了cuda和cudnn后,就再也运行不了

出错提示:

Running on local URL:http://127.0.0.1:7860
2024-09-10 00:09:43.1035172 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\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', {'device_id': '0', 'cudnn_conv_algo_search': 'DEFAULT'})]
Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying.
2024-09-10 00:09:43.2558304 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

Traceback (most recent call last):
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
File "C:\FaceFusion_2.6.0\python310\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 "C:\FaceFusion_2.6.0\python310\lib\site-packages\gradio\queueing.py", line 407, in call_prediction
    output = await route_utils.call_process_api(
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\gradio\blocks.py", line 1550, in process_api
    result = await self.call_function(
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\gradio\blocks.py", line 1185, in call_function
    prediction = await anyio.to_thread.run_sync(
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\gradio\utils.py", line 661, in wrapper
    response = f(*args, **kwargs)
File "C:\FaceFusion_2.6.0\facefusion\uis\components\preview.py", line 178, in update_preview_image
    preview_vision_frame = process_preview_frame(reference_faces, source_face, source_audio_frame, temp_vision_frame)
File "C:\FaceFusion_2.6.0\facefusion\uis\components\preview.py", line 200, in process_preview_frame
    target_vision_frame = frame_processor_module.process_frame(
File "C:\FaceFusion_2.6.0\facefusion\processors\frame\modules\face_enhancer.py", line 261, in process_frame
    target_vision_frame = enhance_face(target_face, target_vision_frame)
File "C:\FaceFusion_2.6.0\facefusion\processors\frame\modules\face_enhancer.py", line 204, in enhance_face
    crop_vision_frame = apply_enhance(crop_vision_frame)
File "C:\FaceFusion_2.6.0\facefusion\processors\frame\modules\face_enhancer.py", line 213, in apply_enhance
    frame_processor = get_frame_processor()
File "C:\FaceFusion_2.6.0\facefusion\processors\frame\modules\face_enhancer.py", line 107, in get_frame_processor
    FRAME_PROCESSOR = onnxruntime.InferenceSession(model_path, providers = apply_execution_provider_options(facefusion.globals.execution_device_id, facefusion.globals.execution_providers))
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 430, in __init__
    raise fallback_error from e
File "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 425, in __init__
    self._create_inference_session(self._fallback_providers, None)
File "C:\FaceFusion_2.6.0\python310\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.

Arwar 发表于 2024-9-10 00:51:46

把环境变量CUDA_PATH 注释掉后,又可以用,但是选CUDA,CPU用100%,GPU只用了1-2%,而且非常慢

Arwar 发表于 2024-9-10 00:56:20

Arwar 发表于 2024-9-10 00:51
把环境变量CUDA_PATH 注释掉后,又可以用,但是选CUDA,CPU用100%,GPU只用了1-2%,而且非常慢
...

把环境参数注释掉后的运行代码,CUDA也是用不了的

-----------------------------------------------
更多好玩的AI应用,访问 https://deepface.cc
FaceFusion WebUI正在启动中,请稍后
-----------------------------------------------
Running on local URL:http://127.0.0.1:7860
2024-09-10 00:47:46.5897328 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-09-10 00:47:57.8229684 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

正在分析: 100%|========================================================| 2409/2409
正在提取分辨率为720x1280,每秒25.0帧的帧
正在处理
正在处理:   0%| | 0/2409 , execution_thread_count=4, execution_queue_co2024-09-10 00:48:33.9558129 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-09-10 00:48:34.2011241 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-09-10 00:48:34.5614814 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-09-10 00:48:35.1830855 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-09-10 00:48:35.2472554 D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\FaceFusion_2.6.0\python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

正在处理:   8%| | 188/2409 , execution_thread_count=4, executio

无言以对 发表于 2024-9-10 09:20:02

Arwar 发表于 2024-9-10 00:56
把环境参数注释掉后的运行代码,CUDA也是用不了的

-----------------------------------------------


因为目前的主流AI项目都是基于N卡的 CUDA 生态,所以,接下来就要安装 CUDA (CUDA非必要不要安装12.X,很多AI程序不兼容) 和 cuDNN,这样就能确保一键包的正常运行。


windows下CUDA与cuDNN和安装和配置:https://deepface.cc/thread-268-1-1.html视频教程 https://www.bilibili.com/video/BV1wm41167w8/

Arwar 发表于 2024-9-10 09:35:02



确是按指引安装的成功了,运行时就出错,请问是cuda版本的原因吗?

无言以对 发表于 2024-9-10 09:57:01

Arwar 发表于 2024-9-10 09:35
确是按指引安装的成功了,运行时就出错,请问是cuda版本的原因吗?

报错就是cuda没安装
不知道是不是12.4版本高了的问题,你可以试试再装个11.8,把11.8设置为默认
https://blog.csdn.net/weixin_42672685/article/details/138814153

Arwar 发表于 2024-9-10 10:41:12

应该是版本兼容的问题,可以确定是成功安装了的,运行另一个MuseTalk模型,比没安装cuda前快了很多,GPU拉满。


运行nvcc --version
C:\Users\MSI-NB>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:30:10_Pacific_Daylight_Time_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0

页: 1 [2] 3
查看完整版本: 【AI换脸】一键换脸 FaceFusion2.6.0 N卡版 本地一键整合包下载