handle when user has gpu but won't use it
This commit is contained in:
parent
d72d9d7328
commit
fa813d8025
@ -1,7 +1,8 @@
|
|||||||
import insightface
|
import insightface
|
||||||
import onnxruntime
|
import onnxruntime
|
||||||
|
import core.globals
|
||||||
|
|
||||||
face_analyser = insightface.app.FaceAnalysis(name='buffalo_l', providers=onnxruntime.get_available_providers())
|
face_analyser = insightface.app.FaceAnalysis(name='buffalo_l', providers=core.globals.providers)
|
||||||
face_analyser.prepare(ctx_id=0, det_size=(640, 640))
|
face_analyser.prepare(ctx_id=0, det_size=(640, 640))
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import cv2
|
import cv2
|
||||||
import insightface
|
import insightface
|
||||||
import onnxruntime
|
import onnxruntime
|
||||||
|
import core.globals
|
||||||
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=onnxruntime.get_available_providers())
|
face_swapper = insightface.model_zoo.get_model('inswapper_128.onnx', providers=core.globals.providers)
|
||||||
|
|
||||||
|
|
||||||
def process_video(source_img, frame_paths):
|
def process_video(source_img, frame_paths):
|
||||||
|
Loading…
Reference in New Issue
Block a user