Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -43,9 +43,9 @@ def swap_face(source_file, target_file, doFaceEnhancer):
|
|
43 |
roop.globals.many_faces = False
|
44 |
roop.globals.video_encoder = "libx264"
|
45 |
roop.globals.video_quality = 18
|
46 |
-
roop.globals.max_memory = suggest_max_memory()
|
47 |
-
roop.globals.execution_providers = decode_execution_providers(["
|
48 |
-
roop.globals.execution_threads = suggest_execution_threads()
|
49 |
|
50 |
print(
|
51 |
"start process",
|
@@ -71,7 +71,7 @@ with app:
|
|
71 |
fn=swap_face,
|
72 |
inputs=[gr.Image(), gr.Image(), gr.Checkbox(label="Apply Face Enhancer")],
|
73 |
outputs="image",
|
74 |
-
description="
|
75 |
)
|
76 |
|
77 |
app.launch()
|
|
|
43 |
roop.globals.many_faces = False
|
44 |
roop.globals.video_encoder = "libx264"
|
45 |
roop.globals.video_quality = 18
|
46 |
+
roop.globals.max_memory = 14 #suggest_max_memory()
|
47 |
+
roop.globals.execution_providers = decode_execution_providers(["cpu"])
|
48 |
+
roop.globals.execution_threads = 32 #suggest_execution_threads()
|
49 |
|
50 |
print(
|
51 |
"start process",
|
|
|
71 |
fn=swap_face,
|
72 |
inputs=[gr.Image(), gr.Image(), gr.Checkbox(label="Apply Face Enhancer")],
|
73 |
outputs="image",
|
74 |
+
description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding."
|
75 |
)
|
76 |
|
77 |
app.launch()
|