I feel that the processing speed is a little slow #91

Open
opened 2021-08-16 03:54:55 +02:00 by wubangjunjava · 11 comments
wubangjunjava commented 2021-08-16 03:54:55 +02:00 (Migrated from github.com)

I feel that the processing speed is a little slow. How can I improve it? It takes too long for a video to be processed.

I feel that the processing speed is a little slow. How can I improve it? It takes too long for a video to be processed.
NNNNAI commented 2021-08-17 04:27:46 +02:00 (Migrated from github.com)

You can install the gpu version of onnx, the time to process a video will be greatly reduced. Using the command line below should be fine:

pip install onnxruntime-gpu==1.2.0

(Note: the version of onnxruntime-gpu may vary,which depend on you cuda version)

You can install the gpu version of onnx, the time to process a video will be greatly reduced. Using the command line below should be fine: ``` pip install onnxruntime-gpu==1.2.0 ``` (Note: the version of onnxruntime-gpu may vary,which depend on you cuda version)
wubangjunjava commented 2021-08-17 04:36:42 +02:00 (Migrated from github.com)

You can install the gpu version of onnx, the time to process a video will be greatly reduced. Using the command line below should be fine:

pip install onnxruntime-gpu==1.2.0

(Note: the version of onnxruntime-gpu may vary,which depend on you cuda version)

thank you. Problem solving.

> You can install the gpu version of onnx, the time to process a video will be greatly reduced. Using the command line below should be fine: > > ``` > pip install onnxruntime-gpu==1.2.0 > ``` > > (Note: the version of onnxruntime-gpu may vary,which depend on you cuda version) thank you. Problem solving.
ramnnv commented 2021-08-17 07:40:31 +02:00 (Migrated from github.com)

You can install the gpu version of onnx, the time to process a video will be greatly reduced. Using the command line below should be fine:

pip install onnxruntime-gpu==1.2.0

(Note: the version of onnxruntime-gpu may vary,which depend on you cuda version)

Hi. My installation of SimSwap was doing great and working perfectly, but i update to onnxruntime and now im getting error and not working. May you help me to know what i doing wrong please, im newbie with all of this but i want to try that speed improvement. Thank you for all your work.

I have Windows 10, GTX 1060 6gb and my SimSwap installation are on my second hard drive (E:)

C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\onnxruntime\capi_pybind_state.py:13: UserWarning: Cannot load onnxruntime.capi. Error: 'DLL load failed: No se puede encontrar el módulo especificado.'
warnings.warn("Cannot load onnxruntime.capi. Error: '{0}'".format(str(e)))
Traceback (most recent call last):
File "C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\insightface_init_.py", line 8, in
import onnxruntime
File "C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\onnxruntime_init_.py", line 12, in
from onnxruntime.capi._pybind_state import get_all_providers, get_available_providers, get_device, RunOptions, SessionOptions, set_default_logger_severity, NodeArg, ModelMetadata, GraphOptimizationLevel, ExecutionMode
ImportError: cannot import name 'get_all_providers'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test_video_swapsingle.py", line 11, in
from insightface_func.face_detect_crop_single import Face_detect_crop
File "E:\SimSwap\SimSwap-main\insightface_func\face_detect_crop_single.py", line 8, in
from insightface.model_zoo import model_zoo
File "C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\insightface_init_.py", line 11, in
"Unable to import dependency onnxruntime. "
ImportError: Unable to import dependency onnxruntime.

> > > You can install the gpu version of onnx, the time to process a video will be greatly reduced. Using the command line below should be fine: > > ``` > pip install onnxruntime-gpu==1.2.0 > ``` > > (Note: the version of onnxruntime-gpu may vary,which depend on you cuda version) Hi. My installation of SimSwap was doing great and working perfectly, but i update to onnxruntime and now im getting error and not working. May you help me to know what i doing wrong please, im newbie with all of this but i want to try that speed improvement. Thank you for all your work. I have Windows 10, GTX 1060 6gb and my SimSwap installation are on my second hard drive (E:) > C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\onnxruntime\capi\_pybind_state.py:13: UserWarning: Cannot load onnxruntime.capi. Error: 'DLL load failed: No se puede encontrar el módulo especificado.' > warnings.warn("Cannot load onnxruntime.capi. Error: '{0}'".format(str(e))) > Traceback (most recent call last): > File "C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\insightface\__init__.py", line 8, in <module> > import onnxruntime > File "C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\onnxruntime\__init__.py", line 12, in <module> > from onnxruntime.capi._pybind_state import get_all_providers, get_available_providers, get_device, RunOptions, SessionOptions, set_default_logger_severity, NodeArg, ModelMetadata, GraphOptimizationLevel, ExecutionMode > ImportError: cannot import name 'get_all_providers' > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "test_video_swapsingle.py", line 11, in <module> > from insightface_func.face_detect_crop_single import Face_detect_crop > File "E:\SimSwap\SimSwap-main\insightface_func\face_detect_crop_single.py", line 8, in <module> > from insightface.model_zoo import model_zoo > File "C:\Users\ramnnv\anaconda3\envs\simswap\lib\site-packages\insightface\__init__.py", line 11, in <module> > "Unable to import dependency onnxruntime. " > ImportError: Unable to import dependency onnxruntime. >
NNNNAI commented 2021-08-17 08:20:48 +02:00 (Migrated from github.com)

@ramnnv Did you use this command line :pip install onnxruntime-gpu==1.2.0 to install onnx gpu? If so ,you can try to use older version of onnx gpu like 1.1.2 by using pip install onnxruntime-gpu==1.1.2

@ramnnv Did you use this command line :***pip install onnxruntime-gpu==1.2.0*** to install onnx gpu? If so ,you can try to use older version of onnx gpu like 1.1.2 by using pip install onnxruntime-gpu==1.1.2
ramnnv commented 2021-08-17 10:20:09 +02:00 (Migrated from github.com)

@NNNNAI yes, first i use 1.2.0, then i tried the old version you said (1.1.2), but still getting the same error. Now i back to the cpu onnx and SimSwap it's working again...

@NNNNAI yes, first i use 1.2.0, then i tried the old version you said (1.1.2), but still getting the same error. Now i back to the cpu onnx and SimSwap it's working again...
NNNNAI commented 2021-08-17 10:31:55 +02:00 (Migrated from github.com)

@ramnnv which version of cuda did you use.You can type nvcc -V in your terminal to find out the cuda version

@ramnnv which version of cuda did you use.You can type nvcc -V in your terminal to find out the cuda version
ramnnv commented 2021-08-17 10:38:13 +02:00 (Migrated from github.com)

@NNNNAI CUDA Version: 11.2

@NNNNAI CUDA Version: 11.2
NNNNAI commented 2021-08-17 10:43:05 +02:00 (Migrated from github.com)

As shown in the offcial website of onnx,you could try to install 1.7.0 or 1.8.0
image
@ramnnv

As shown in the offcial website of [onnx](https://onnxruntime.ai/docs/reference/execution-providers/CUDA-ExecutionProvider.html#version-dependency),you could try to install 1.7.0 or 1.8.0 ![image](https://user-images.githubusercontent.com/30747212/129693699-55eb1ede-8a97-4ae6-9859-bc79815cf7f3.png) @ramnnv
ramnnv commented 2021-08-18 01:32:30 +02:00 (Migrated from github.com)

@NNNNAI I just tried 1.7.0 and 1.8.0 and got the same error, but thank you for trying to help me. In a few days i will reinstall windows, anaconda, gpu drivers, simswap... etc, so let's hope my problem can be solved.

@NNNNAI I just tried 1.7.0 and 1.8.0 and got the same error, but thank you for trying to help me. In a few days i will reinstall windows, anaconda, gpu drivers, simswap... etc, so let's hope my problem can be solved.
NNNNAI commented 2021-08-18 05:41:04 +02:00 (Migrated from github.com)

Hope you can solve the problem, have a nice day.

Hope you can solve the problem, have a nice day.
JamesWilson19947 commented 2021-10-24 16:24:09 +02:00 (Migrated from github.com)

@NNNNAI I just tried 1.7.0 and 1.8.0 and got the same error, but thank you for trying to help me. In a few days i will reinstall windows, anaconda, gpu drivers, simswap... etc, so let's hope my problem can be solved.

Try 1.9.0. I think this should solve your issues.

pip install onnxruntime-gpu==1.9.0

> @NNNNAI I just tried 1.7.0 and 1.8.0 and got the same error, but thank you for trying to help me. In a few days i will reinstall windows, anaconda, gpu drivers, simswap... etc, so let's hope my problem can be solved. Try 1.9.0. I think this should solve your issues. ```pip install onnxruntime-gpu==1.9.0```
Sign in to join this conversation.