Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ import os
|
|
| 13 |
from PIL import Image
|
| 14 |
import spaces
|
| 15 |
import uuid
|
| 16 |
-
import onnxruntime
|
| 17 |
|
| 18 |
@spaces.GPU
|
| 19 |
def swap_face(source_file, target_file, doFaceEnhancer):
|
|
@@ -49,12 +49,8 @@ def swap_face(source_file, target_file, doFaceEnhancer):
|
|
| 49 |
reference_face_position = 0
|
| 50 |
similar_face_distance = 0.6
|
| 51 |
|
| 52 |
-
print(
|
| 53 |
-
|
| 54 |
-
source_path,
|
| 55 |
-
target_path,
|
| 56 |
-
normalized_output_path,
|
| 57 |
-
)
|
| 58 |
|
| 59 |
for frame_processor in get_frame_processors_modules(frame_processors):
|
| 60 |
if not frame_processor.pre_check():
|
|
|
|
| 13 |
from PIL import Image
|
| 14 |
import spaces
|
| 15 |
import uuid
|
| 16 |
+
import onnxruntime as ort
|
| 17 |
|
| 18 |
@spaces.GPU
|
| 19 |
def swap_face(source_file, target_file, doFaceEnhancer):
|
|
|
|
| 49 |
reference_face_position = 0
|
| 50 |
similar_face_distance = 0.6
|
| 51 |
|
| 52 |
+
print("Available providers:", ort.get_available_providers()) # Ki峄僲 tra c谩c provider hi峄噉 c贸
|
| 53 |
+
print("Configured execution providers:", execution_providers)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
for frame_processor in get_frame_processors_modules(frame_processors):
|
| 56 |
if not frame_processor.pre_check():
|