mirror of
https://github.com/hacksider/Deep-Live-Cam.git
synced 2026-07-31 06:17:33 +02:00
Revert "Merge pull request #1710 from ozp3/amd-dml-optimization"
This reverts commit1b240a45fd, reversing changes made tod9a5500bdf.
This commit is contained in:
@@ -110,6 +110,7 @@ def get_face_swapper() -> Any:
|
||||
))
|
||||
else:
|
||||
providers_config.append(p)
|
||||
|
||||
FACE_SWAPPER = insightface.model_zoo.get_model(
|
||||
model_path,
|
||||
providers=providers_config,
|
||||
@@ -152,10 +153,9 @@ def swap_face(source_face: Face, target_face: Face, temp_frame: Frame) -> Frame:
|
||||
if not temp_frame.flags['C_CONTIGUOUS']:
|
||||
temp_frame = np.ascontiguousarray(temp_frame)
|
||||
|
||||
with modules.globals.dml_lock:
|
||||
swapped_frame_raw = face_swapper.get(
|
||||
temp_frame, target_face, source_face, paste_back=True
|
||||
)
|
||||
swapped_frame_raw = face_swapper.get(
|
||||
temp_frame, target_face, source_face, paste_back=True
|
||||
)
|
||||
|
||||
# --- START: CRITICAL FIX FOR ORT 1.17 ---
|
||||
# Check the output type and range from the model
|
||||
@@ -1183,4 +1183,4 @@ def apply_color_transfer(source, target):
|
||||
# traceback.print_exc()
|
||||
return source
|
||||
|
||||
return result_bgr
|
||||
return result_bgr
|
||||
Reference in New Issue
Block a user