Revert "Merge pull request #1710 from ozp3/amd-dml-optimization"

This reverts commit 1b240a45fd, reversing
changes made to d9a5500bdf.
This commit is contained in:
Kenneth Estanislao
2026-04-01 22:33:01 +08:00
parent 1b240a45fd
commit b6b6c741a2
6 changed files with 78 additions and 133 deletions
+5 -5
View File
@@ -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