SimSwap
SimSwap copied to clipboard
Same error messages every time for videos (doesn't happen when making a cropped image)
File "D:\SimSwap\SimSwap\test_video_swapsingle.py", line 58, in
Also pretty much every other time i use it this error pops up
raise ValueError( ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] enabled. Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession. For example, onnxruntime.InferenceSession(..., providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'], ...)
I'm getting this error on my anaconda version of trying to run this. I can't figure it out either. And there is a problem with the colab version as well.
Here is how I solved this issue.
Go to "C:\Users\chick\AppData\Local\Programs\Python\Python310\lib\site-packages\insightface\model_zoo\model_zoo.py" Edit the file on the on the line 56 or somewhere above it.
I did this in conda so i edited the file in "C:\Users\Jatin\anaconda3\envs\simswap\Lib\site-packages\insightface\model_zoo" I edited the file model_zoo.py where i replaced.
def get_model(self): session = onnxruntime.InferenceSession()
with
**def get_model(self): session = onnxruntime.InferenceSession(self.onnx_file, providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider']) **
after this i had errors about numpy np.float error in reverse2original file. I changed np.float to np.float64 in three lines in that python file.
solved it for me too! thanks!
running GTX3060ti with cuda12.0 on windows 11
- using anaconda and preparation
- Python 3.8
- conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
- changes highlighted above by strider1716
mark