fetch available providers

This commit is contained in:
Somdev Sangwan 2023-05-29 17:39:52 +05:30 committed by GitHub
parent c18f66697a
commit ae3b2f8d3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,10 @@
import cv2 import cv2
import insightface import insightface
import onnxruntime
from core.config import get_face from core.config import get_face
from core.utils import rreplace from core.utils import rreplace
face_swapper = insightface.model_zoo.get_model('inswapper_128.onnx', providers=['CUDAExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider']) face_swapper = insightface.model_zoo.get_model('inswapper_128.onnx', providers=onnxruntime.get_available_providers())
def process_video(source_img, frame_paths): def process_video(source_img, frame_paths):