ezioruan commited on
Commit
82bcee4
1 Parent(s): 3dea108
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -9,6 +9,7 @@ from roop.core import (
9
  suggest_max_memory,
10
  suggest_execution_threads,
11
  )
 
12
  from roop.utilities import normalize_output_path
13
  import os
14
  from PIL import Image
@@ -52,11 +53,17 @@ def swap_face(source_file, target_file):
52
  roop.globals.output_path,
53
  )
54
 
 
 
 
 
 
 
55
  start()
56
  return output_path
57
 
58
 
59
- demo = gr.Interface(
60
  fn=swap_face, inputs=[gr.Image(), gr.Image()], outputs="image"
61
  )
62
- demo.launch()
 
9
  suggest_max_memory,
10
  suggest_execution_threads,
11
  )
12
+ from roop.processors.frame.core import get_frame_processors_modules
13
  from roop.utilities import normalize_output_path
14
  import os
15
  from PIL import Image
 
53
  roop.globals.output_path,
54
  )
55
 
56
+ for frame_processor in get_frame_processors_modules(
57
+ roop.globals.frame_processors
58
+ ):
59
+ if not frame_processor.pre_check():
60
+ return
61
+
62
  start()
63
  return output_path
64
 
65
 
66
+ app = gr.Interface(
67
  fn=swap_face, inputs=[gr.Image(), gr.Image()], outputs="image"
68
  )
69
+ app.launch()