Jonny001 commited on
Commit
0b96432
·
verified ·
1 Parent(s): 6bcd9b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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(["cuda"])
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="Swap faces between two images. Use the Face Enhancer option to improve the result. Processing may take longer if you use Face Enhancer because this model is running using the CPU."
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()